#include <stdio.h>
#include <stdlib.h>
int main()
{ printf("摄氏---华氏\n");
int f;
float c;
for(f=0;f<=300;f+=10)
{
c=(float)(f-32)*5/9;
printf("%.2f---%d\t",c,f);
}
}
知识点
要学会用for循环
#include <stdio.h>
#include <stdlib.h>
int main()
{ printf("摄氏---华氏\n");
int f;
float c;
for(f=0;f<=300;f+=10)
{
c=(float)(f-32)*5/9;
printf("%.2f---%d\t",c,f);
}
}
知识点
要学会用for循环