← Unit 1 · all exercises
Saved in this browser only

Celsius to Fahrenheit

Convert a temperature in Celsius to Fahrenheit. Multiply by 9, divide by 5, then add 32.

double toFahrenheit(double celsius)

Solution.java
Loading editor…
Results

Examples

  • toFahrenheit(0) → 32water freezes
  • toFahrenheit(100) → 212water boils

There are also 4 hidden tests you can't see. Solve the problem, not the examples.