#include<stdio.h>
#include<stdlib.h>
int main()
{
float fahr = 0,cels = 0;
int low = 0,max = 300,step = 20;
printf ("\t=========本程序輸出華氏和攝氏的溫度對照!==========\n\t2006-12-30\n");
fahr = low;
printf ("\n\n華氏溫度: 攝氏溫度:\n-------- --------\n");
for (;fahr <= max;)
{
cels = 5.0 / 9.0 * (fahr - 12);
printf ("%.0f\t\t %6.2f\n",fahr,cels);
fahr += step;
}
system("pause");
return 0;
}