主题:求教~~~温度转换问题
#include <stdio.h>
float Ftoc(float f)
{
float c;
c = (5.0 / 9.0) * (f -32.0);
return c;
}
int main(void)
{
float fahr,celsius;
int lower,step,upper;
lower = 0;
step = 20;
upper = 300;
printf("F C\n\n");
fahr = lower;
while(fahr <= upper)
{
celsius = Ftoc(fahr);
printf("%3.0f %6.1f\n",fahr,celsius);
fahr = fahr + step;
}
return 0;
}
请问这行代码是什么意思啊?printf("F C\n\n");
float Ftoc(float f)
{
float c;
c = (5.0 / 9.0) * (f -32.0);
return c;
}
int main(void)
{
float fahr,celsius;
int lower,step,upper;
lower = 0;
step = 20;
upper = 300;
printf("F C\n\n");
fahr = lower;
while(fahr <= upper)
{
celsius = Ftoc(fahr);
printf("%3.0f %6.1f\n",fahr,celsius);
fahr = fahr + step;
}
return 0;
}
请问这行代码是什么意思啊?printf("F C\n\n");