Berikut akan saya paparkan contoh program konversi Suhu Farenheit ke Celcius dalam bahasa C
#include<stdio.h>
int main()
{
float F,C;
int x,y,step;
printf("input x= ");
scanf("%d",&x);
printf("input y= ");
scanf("%d",&y);
printf("input step= ");
scanf("%d",&step);
F=x;
while (F<=y)
{
C=(5.0/9.0)*(F-32);
printf("output F= %.2f \n",F);
printf("output C= %.2f",C);
F=F+step;
}
return 0;
}
Semoga Bermanfaat :D