Fix the code Ruby to generate the output depicted below Here
Fix the code (Ruby) to generate the output depicted below:
Here\'s the code I have currently:
puts \"Enter your age:\"
 gets age
 print \'You have been living for \'
 print Age*24*365*60*60
 puts\' seconds!\'
 puts \'WOW!\'
Solution
Working code:
puts \"Enter your age:\"
 a = gets.chomp
 print \'You have been living for \'
 c = a.to_i*24*365*60*60
 print c
 puts\' seconds!\'
 puts \'WOW!\'

