I am trying to convert a temperature from Fahrenheit to Celsius:
puts 'Convertir grados Fahrenheit a Celcius'
STDOUT.flush
x = gets.chomp
aprox = (x * 100.0).round(2) / 100.0
resultado = (aprox-32)/1.8
puts resultado
I use the correct formula for converting Fahrenheit to Celcius:
Celsius = Fahrenheit - 32 / 1.8
However, when I run this in the console, it gives me the following error:
`round': wrong number of arguments (1 for 0) (ArgumentError)
I've tried different things but I don't understand why this doesn't work.