程序:
#include<stdio.h>
main()
{
int fahr;
float cel;
for(fahr=0;fahr<300;fahr=fahr+20)
{
cel=(5/9)*(fahr-32);
printf("\n %d \t %f",fahr,cel);
}
}
我得到的输出:
0 0.000000
20 0.000000
40 0.000000
60 0.000000
80 0.000000
100 0.000000
120 0.000000
140 0.000000
160 0.000000
180 0.000000
200 0.000000
220 0.000000
240 0.000000
260 0.000000
280 0.000000