Sail E0 Webinar
Question
What is the output of the given code?m= 8loop do    m += 2    puts m    break if m == 16end
Options:
A .  10 12 14 16
B .  Nil
C .  Error
D .  None of the mentioned
Answer: Option A


Execute the loop till the condition is met.
Output:
10
12
14
16



Was this answer helpful ?

Submit Solution

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

Latest Videos

Latest Test Papers