5. Celsius to Fahrenheit
Foundation1000 ms256 MBSolved by 0%
Read a temperature in Celsius and print it in Fahrenheit, rounded down to the nearest whole number.
The conversion is:
F = C × 9 / 5 + 32
Rounding down means -0.4 becomes -1, not 0. Take the floor, not the
truncation.
Constraints - `-273 ≤ C ≤ 1000`
Input
A single line containing one integer n.
Output
Print one integer, the temperature in Fahrenheit, rounded DOWN. Rounding down means -0.4 becomes -1, not 0.
Input0
Output32
Noteis freezing point, the value everybody knows
Input100
Output212
Noteis boiling point
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.
Hint 1Where to start
Hint 2The approachOpen hint 1 first. This one carries on from it.
Hint 3PseudocodeOpen hint 2 first. This one carries on from it.
Hint 4Full solutionOpen hint 3 first. This one carries on from it.