Answers for "C++ Converting Celsius to Kelvin"

C++
0

C++ Converting Celsius to Kelvin

float cel, kel;

    cout << "Converting Celsius to Kelvin\n";
    cout << "------------------------------------";
    cout <<"\n";
    cout << "Enter the temperature in Celsius: ";
    cin >> cel;

    kel = cel + 273.15;      //T(K) = T(°C) + 273.15 (0 °C = 273.15 K )
    cout << "The temperature of " << cel << " in Kelvin is: " << kel;
Posted by: Guest on March-09-2022

Code answers related to "C++ Converting Celsius to Kelvin"

Browse Popular Code Answers by Language