Skip to content

Instantly share code, notes, and snippets.

@jamesmichiemo
Last active December 18, 2015 05:59
Show Gist options
  • Save jamesmichiemo/5736337 to your computer and use it in GitHub Desktop.
Save jamesmichiemo/5736337 to your computer and use it in GitHub Desktop.
expressions in Ruby language
# Dog Years
# Calculate the age of Spike in dog years bases on his actual age
#
print "What age is Spike?: "
actualAge = gets.chomp().to_i
dogAge = actualAge * 7
puts "Spike's actual age is #{actualAge} but his age in dog years is #{dogAge}."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment