Nitin400

Program to convert Celcius fohr Kelvin

Jul 15th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int celcius, fahr, kelvin;
  5.     int lower, upper,step;
  6.     lower=0;
  7.     upper=100;
  8.     step=10;
  9.     celcius=lower;
  10.     while (celcius<=upper)
  11.     {
  12.         fahr=(celcius*1.8)+32;
  13.         kelvin=celcius+273.15;
  14.         printf("%d\t %d\t \n",celcius ,fahr, kelvin);
  15.         celcius=celcius+step;
  16.     }
  17. }
Add Comment
Please, Sign In to add comment