作业试验
/*输出华氏-摄氏温度转换表,华氏温度取值[lower,upper],每次增加1°F*/ #include<stdio.h> int main(void) { int fahr,lower,upper; double celsius; printf("Enter lower:"); scanf("%d",&lower); printf("Enter upper:"); scanf("%d",&upper); printf("fahr celsius\n"); for(fahr=lower;fahr<=upper;fahr++){ celsius=(5.0/9.0)*(fahr-32); printf("%d%6.1f\n",fahr,celsius); } return 0; }