Menu
Coddy logo textTech

Fahrenheit to Kelvin

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

challenge icon

Challenge

Easy

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

The formula to convert from fahrenheit to kelvin is:

Try it yourself

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

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

double fahrenheitToCelsius(double fahrenheit) {
    return (fahrenheit - 32.0) * 5.0 / 9.0;
}

All lessons in Temperature Converter using C++