This is because 5/9 is incorrect. This is integer division, always returns 0 when a numerator is less than denominator.
If you simply change the order of multiplication, first integer operand will implicitly convert to double; and then all other operands will be converted to double, as the first operand
temperature
is declared double; and you will get a correct result:
celsius = (temperature - 32) * 5 / 9;
See:
http://en.wikipedia.org/wiki/Celsius[
^].
—SA