Ruby Code Sample
Find out how old you are in seconds (or converting years to seconds)...well, sort of.
seconds_per_year = 31536000
puts "How old are you in seconds?"
age_in_years = gets.chomp.to_i / seconds_per_year
puts "You are " + age_in_years.to_s + " years old!"
Copyright © 1999-2011 Mary F. Jenn. All rights reserved.