V

Vinay Kumar • 8.55K Points
Tutor III

Q. What will be the output of the given code?

Code:
i=1
for i in 6..10
puts i**2
end
  • (A) 36 49 64 81
  • (B) 49 64 81 100
  • (C) 49 64 81
  • (D) 36 49 64 81 100

Explanation by: Vinay Kumar
The output for the following code is 36 49 64 81 100.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.