Menu
Coddy logo textTech

Fahrenheit to Celsius

Lesson 4 of 10 in Coddy's Temperature Converter using C++ course.

challenge icon

Challenge

Easy

Add a function named fahrenheitToCelsius that gets a fahrenheit value (float) and returns its conversion to celsius  (float).

The formula to convert from fahrenheit to celsius is:

Try it yourself

float celsiusToFahrenheit(float celsius) {
    return (celsius * 9.0 / 5.0) + 32.0;
}

double celsiusToKelvin(double celsius) {
    return celsius + 273.15;
}

All lessons in Temperature Converter using C++