The Program in C++ to convert Kelvin to Celsius is given below:
#include <iostream>
using namespace std;
int main() {
double kelvin, celsius;
cout << "Enter temperature in Kelvin: ";
cin >> kelvin;
celsius = kelvin - 273.15;
cout << "Temperature in Celsius: " << celsius << endl;
return 0;
}
Output:
Enter temperature in Kelvin: 78
Temperature in Celsius: -195.15
Pro-Tips💡
In this program, the user is prompted to enter a temperature in Kelvin.
This temperature is then stored in the variable kelvin
.
The temperature is then converted to Celsius using the formula celsius = kelvin - 273.15
.
The resulting temperature in Celsius is then displayed on the screen.
Learn C-Sharp ↗
C-sharp covers every topic to learn about C-Sharp thoroughly.
Learn C Programming ↗
C-Programming covers every topic to learn about C-Sharp thoroughly.
Learn C++ Programming↗
C++ covers every topic to learn about C-Sharp thoroughly.