#include<stdio.h>
int main()
{
int lower,upper,fahr;
double celsius;
printf(“请输入lower和upper:”);
scanf("%d %d",&lower,&upper);
if(lower<=upper)
{
printf(“fahr celsius\n”);
for(fahr=lower;fahr<=upper;fahr++)
{
celsius=(5.0/9.0)*(fahr-32);
printf("%4d%6.1f\n",fahr,celsius);
}
}
else
{
printf(“invalid value\n”);
}
return 0;
}
华氏-摄氏温度转换表
最新推荐文章于 2021-04-21 17:16:50 发布