#include <stdio.h>
void main()
{
float cel, fahr,kel;
printf("Enter the temperature in
fahrenheit:");
scanf("%f",&fahr);
cel=5.0/9*(fahr-32);
kel=cel+273.15;
printf("Enter the temperature in
celcius =%f\n",cel);
printf("The temperature in
kelvin=%f",kel);
}
Output
[root@localhost ~]# cd ~/Desktop
[root@localhost Desktop]# gcc fck.c
[root@localhost Desktop]# ./a.out
Enter the temperature in fahrenheit: 30
Enter the temperature in celcius =-1.111111
The temperature in kelvin=272.038879 😊
0 coment�rios: