更新 '2207/C语言精通120题.md'

This commit is contained in:
smallkun 2025-02-17 19:33:33 +08:00
parent 073e71187b
commit 5feafc6471

View File

@ -22,7 +22,20 @@ int main(void){
2输入一个华氏温度要求输出摄氏温度。公式为c=5/9*(f-32) 2输入一个华氏温度要求输出摄氏温度。公式为c=5/9*(f-32)
```c
#include <stdio.h>
int main(void){
float f, c;
scanf("%f", &f);
//c = 5.0/9*(f-32);
c = (double)5/9*(f-32);
printf("%f\n", c);
return 0;
}
```
3写一个程序输入实数X,输出Y,计算<img src="https://yp.smallkun.cn/markdown/image-20250116004443767.png!compress" alt="image-20250116004443767" style="zoom:33%;" /> 3写一个程序输入实数X,输出Y,计算<img src="https://yp.smallkun.cn/markdown/image-20250116004443767.png!compress" alt="image-20250116004443767" style="zoom:33%;" />