-
-
Save anonymous/215dbc09769af1c606d709bd47a9ee33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hours_in_year = 24 * 365 | |
minutes_in_decade = (hours_in_year * 10) * 60 | |
seconds_in_year = 365 * 24 * 60 * 60 | |
puts "There are " + hours_in_year.to_s + " hours in a year." | |
puts "There are " + minutes_in_decade.to_s + " minutes in a decade." | |
puts "How old are you?" | |
age_in_years = gets.chomp | |
age_in_seconds = age_in_years * seconds_in_year | |
puts "You are " + age_in_years.to_s + " years old, which means that you have been alive for approximately " + age_in_seconds.to_s + " seconds." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment