# Program to convert temperature from degree Celsius to Kelvin

Given temperature in degree Celsius, convert it into to Kelvin .

Examples:

```Input : C = 100
Output : k = 373.15

Input : C = 110
Output : k = 383.15
```

## Recommended: Please try your approach on {IDE} first, before moving on to the solution.

Formula for converting temperature in degree Celsius to kelvin-

```K = ( °C + 273.15 )
0 °C = 273.15 kelvin```

Below is the program for temperature conversion:

## C++

 `// CPP program to convert temperature  ` `// from degree Celsius to kelvin ` `#include ` `using` `namespace` `std; ` ` `  `// function to convert temperature ` `// from degree Celsius to Kelvin ` `float` `Celsius_to_Kelvin(``float` `C) ` `{ ` `    ``return` `(C + 273.15); ` `} ` ` `  `// driver function ` `int` `main() ` `{ ` `    ``// variable to hold the  ` `    ``// temperature in Celsius ` `    ``float` `C = 100; ` ` `  `    ``cout << ``"Temperature in Kelvin ( K ) = "`  `         ``<< Celsius_to_Kelvin(C); ` `     `  `    ``return` `0; ` `} `

## Java

 `// Java program to convert temperature  ` `// from degree Celsius to kelvin ` `import` `java.io.*; ` ` `  `class` `GFG { ` `    ``// function to convert temperature ` `    ``// from degree Celsius to Kelvin ` `    ``static` `float` `Celsius_to_Kelvin(``float` `C) ` `    ``{ ` `        ``return` `(``float``)(C + ``273.15``); ` `    ``} ` `     `  `    ``// Driver function ` `    ``public` `static` `void` `main (String[] args)  ` `    ``{ ` `        ``// variable to hold the  ` `        ``// temperature in Celsius ` `        ``float` `C = ``100``; ` `     `  `        ``System .out.println ( ``"Temperature in Kelvin ( K ) = "` `                             ``+ Celsius_to_Kelvin(C)); ` `             `  `    ``} ` `} ` ` `  `// This code is contributed by vt_m. `

## Python3

 `# Python3 program to convert temperature  ` `# from degree Celsius to kelvin ` ` `  `# Function to convert temperature ` `# from degree Celsius to Kelvin ` `def` `Celsius_to_Kelvin(C): ` `    ``return` `(C ``+` `273.15``) ` ` `  `# Driver Code ` ` `  `# variable to hold the  ` `# temperature in Celsius ` `C ``=` `100` ` `  `print``(``"Temperature in Kelvin ( K ) = "``,  ` `                    ``Celsius_to_Kelvin(C)) ` `                     `  `# This code is contributed by Anant Agarwal. `

## C#

 `// C# program to convert temperature ` `// from degree Celsius to kelvin ` `using` `System; ` ` `  `class` `GFG { ` `     `  `    ``// function to convert temperature ` `    ``// from degree Celsius to Kelvin ` `    ``static` `float` `Celsius_to_Kelvin(``float` `C) ` `    ``{ ` `        ``return` `(``float``)(C + 273.15); ` `    ``} ` ` `  `    ``// Driver function ` `    ``public` `static` `void` `Main() ` `    ``{ ` `        ``// variable to hold the ` `        ``// temperature in Celsius ` `        ``float` `C = 100; ` ` `  `        ``Console.WriteLine(``"Temperature in Kelvin ( K ) = "` `+ ` `                                       ``Celsius_to_Kelvin(C)); ` `    ``} ` `} ` ` `  `// This code is contributed by vt_m. `

## PHP

 ` `

Output:

```Temperature in Kelvin ( K ) = 373.15
```

My Personal Notes arrow_drop_up Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Improved By : vt_m

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.