Skip to content

Instantly share code, notes, and snippets.

@martinium
Created December 26, 2016 18:28
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