educative.io

Chalenge definition

The definition of the challenge is kind of misleading…

To convert temperature from degrees Fahrenheit to degrees Celsius, you first need to subtract 32 from the temperature, then multiply it by 5 , followed by a division by 9 .

If I had to follow this definition, I would write:
var temp = (fahrenheit - 32) * 5 / 9

Instead the solution provided was:
var temp = (fahrenheit - 32) * (5 / 9)

Which is not the same as the definition, it would be better this way:

To convert temperature from degrees Fahrenheit to degrees Celsius, you first need to subtract 32 from the temperature, and multiply it by 5 divided by 9 .

The answer will be same from both the formulas but we have still updated in the course