+ 1
What's wrong with my code?
A number is fed to the input. You need to count it and output this number squared. Sample Input: 6 Sample Output: 36 puts "6" num = gets.chomp.to_i puts "6**2"
3 Answers
+ 1
# Good Luck
num = gets.chomp.to_i
puts num**2
+ 1
Thanks
0
String denoted by " "