In this article, we will discuss the program to convert temperature degree from Celsius to Kelvin in different programming languages.
But before writing the programs, let's first discuss Celsius, Kelvin, and the formula to convert temperature degree from Celsius to Kelvin.
What is Celsius?
Celsius is the unit to measure the temperature. It is also known as Centigrade. The symbol °C (read as degree Celsius or Centigrade) represents it. There is no difference between Centigrade and Celsius. Celsius was invented by the Andes Celsius. It is also called Centigrade because the scale is defined between 0 to 100 degree.
In the Celsius scale, 0°C represents the melting point of the ice, while 100°C represents the boiling point of water. The absolute zero in the Celsius scale is 273.15°C.
What is Kelvin?
It is an SI base unit of temperature. Its unit symbol is K. Unlike Celsius, Kelvin is not written in degree.
To find the Kelvin temperature from Celsius, we can use the below formula -
K = 0C + 273
To convert the temperature from Celsius to Kelvin, the value is to be increased numerically by 273. Zero Kelvin (0K) is equal to -2730 C.
Formula to convert temperature degree from Celsius to Kelvin
The formula of converting the temperature degree from Celsius to Kelvin is given as follows -
Celsius to Kelvin, K = C + 273.15
Programs to convert temperature degree from Celsius to Kelvin
Now, let's see the programs to convert temperature degree from Celsius to Kelvin. The approach that we are using in the programs is given as follows -
- The temperature is given in the degree Celsius.
- After that, we will use the below formula to convert it into Kelvin -
K = C + 273.15