题解 | #温度转换#
温度转换
https://www.nowcoder.com/practice/ba83647087b7447783fa2384da6b3d44
#include <stdio.h>
int main() {
float f, c;
scanf("%f", &f);
c = 5.0 / 9 * (f - 32);
printf("%.3f", c);
return 0;
}
5.0/9即可进行浮点数运算
温度转换
https://www.nowcoder.com/practice/ba83647087b7447783fa2384da6b3d44
#include <stdio.h>
int main() {
float f, c;
scanf("%f", &f);
c = 5.0 / 9 * (f - 32);
printf("%.3f", c);
return 0;
}
5.0/9即可进行浮点数运算
相关推荐