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;