Skip to content

Instantly share code, notes, and snippets.

@big-samantha
Created October 8, 2012 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save big-samantha/3850497 to your computer and use it in GitHub Desktop.
Save big-samantha/3850497 to your computer and use it in GitHub Desktop.
#wooo we're making a function
def convert_feet_to_meters(number_of_feet)
puts "You have #{number_of_feet} feet."
number_of_meters = number_of_feet * 0.3048
puts "That's equal to #{number_of_meters} meters!"
end
convert_feet_to_meters(3)
puts 'How many feet do you have?'
feet_haved = STDIN.gets.chomp
convert_feet_to_meters(feet_haved)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment