πŸ“Š Ruby
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) 36 49 64 81 100

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
174
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Vinay Kumar
Publisher
πŸ“ˆ
80%
Success Rate