Skip to content

Instantly share code, notes, and snippets.

@martinium
Created December 26, 2016 18:28
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 martinium/1d43e2f7517d115d15510f2df68542fe to your computer and use it in GitHub Desktop.
Save martinium/1d43e2f7517d115d15510f2df68542fe to your computer and use it in GitHub Desktop.
Temp converter
def fahrToCels(fahr : Number)
celsius = 5 * (fahr - 32) / 9
puts "The temperature #{fahr} Fahrenheit is #{celsius} in Celsius degrees."
end
input = STDIN.gets.to_i
fahrToCels(input)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment