Sail E0 Webinar
Question
What is the output of the given code?for num in 1..5  puts num*numendx
Options:
A .  12345678910
B .  1 2 3 4
C .  1 4 9 16 25
D .  None of the mentioned
Answer: Option C


Loop till the condition is met and break when the condition is not satisfied.
Output:
1
4
9
16
25



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers