Skip to content

Instantly share code, notes, and snippets.

@chadjemmett
Created November 17, 2011 22:58
Show Gist options
  • Save chadjemmett/1374841 to your computer and use it in GitHub Desktop.
Save chadjemmett/1374841 to your computer and use it in GitHub Desktop.
this code goes into a loop.
def age_method(age)
year = 314712000
puts "you are " + (age*year).to_s + " seconds old"
puts "you are " + (year/3600).to_s + " hours old"
end
puts "What is your age?"
age = gets.chomp
age_method(age)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment