Vidyalelo
Ruby Programming · Q62

Control Structures in Ruby

Programming · Ruby Programming · question 62

Q62

What is the output of the given code? counter=6 if counter 5 puts (counter) counter=2*counter puts(counter) else puts(counter) counter=counter-1 puts(counter) end

A.
5
10
B.
6
12
Answer
C.
Syntax error
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board