Vidyalelo
Ruby Programming · Q95

Control Structures in Ruby

Programming · Ruby Programming · question 95

Q95

What is the output of the given code? a=5 b=15 while b>a puts a*(b-a) while a>b a+=1 b-=1 end end

A.
5..15
B.
50
C.
Infinite loop
Answer
D.
5 50

Answer: Option C

Solution

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