Vidyalelo
Ruby Programming · Q118

Control Structures in Ruby

Programming · Ruby Programming · question 118

Q118

What is the output of the given code? i=1 for i in 5..10 puts i^2 end

A.
7 4 5 10 11 8
B.
25 36 49 64 81 100
Answer
C.
1 4 9 16 25
D.
None of the mentioned

Answer: Option B

Solution

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