Skip to main content

Practice ยท 3 of 5

Temperature converter

Implement two methods: toCelsius(double f) = (f - 32) * 5 / 9 and toFahrenheit(double c) = c * 9 / 5 + 32. Results must be exact doubles.

Difficulty: beginner

Back to lesson: Practice: Practice: Types at Work