求助
#include <stdio.h>main()
{
float fahr,celsius;
int lower,upper,step;
lower = 0;
upper = 300;
step = 20;
fahr = lower;
while (fahr <= upper){
celsius = (5.0/9.0)*(fahr-32.0);
printf("%3.0f %6.1f\n",fahr,celsius);
fahr = fahr = step;
}
}
ld returned 1 exit status
我没有检查出哪里有错误,有大神帮看一下吗,谢谢! 应该是这样吧
#include <stdio.h>
main()
{
float fahr, celsius;
int lower, upper, step;
lower = 0;
upper = 300;
step = 20;
fahr = lower;
while (fahr <= upper)
{
celsius = (5.0 / 9.0) * (fahr - 32.0);
printf("%3.0f %6.1f\n", fahr, celsius);
fahr = fahr + step; // 修改
}
} zltzlt 发表于 2020-8-17 06:54
应该是这样吧
谢谢!
页:
[1]