题目描述
输出华氏--摄氏温度转换表,华氏温度的转换范围是[low,high],转换增量为step。
输入
三个整数,分别表示华氏温度的low、high、step。
输出
对应的摄氏温度值,一行一个,保留一位小数。
样例输入
32 41 3
样例输出
0.0
1.7
3.3
5.0
题目描述
输出华氏--摄氏温度转换表,华氏温度的转换范围是[low,high],转换增量为step。
输入
三个整数,分别表示华氏温度的low、high、step。
输出
对应的摄氏温度值,一行一个,保留一位小数。
样例输入
32 41 3
样例输出
0.0
1.7
3.3
5.0
你题目的解答代码如下:(如有帮助,望采纳!谢谢! 点击我这个回答右上方的【采纳】按钮)
#include<stdio.h>
void main(){
int low,high,step,i;
scanf("%d%d%d",&low,&high,&step);
for (int i = low; i <= high; i+=step)
{
float c=5.0*(i-32)/9;
printf("%.1f\n",c);
}
}