#include<bits/stdc++.h>
using namespace std;
int main(){
int fahr, lower, upper;
double celsius;
printf("Enter lower:");
scanf("%d", &lower);
printf("Enter upper:");
scanf("%d", &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;
}
新手求助,为什么这个代码运行后fahr不能从lower开始起,而是从upper加一开始
最新推荐文章于 2024-10-06 22:20:18 发布