From 5feafc64717301815b49d9f557a8bebc67beeefe Mon Sep 17 00:00:00 2001 From: smallkun Date: Mon, 17 Feb 2025 19:33:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'2207/C=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E7=B2=BE=E9=80=9A120=E9=A2=98.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2207/C语言精通120题.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/2207/C语言精通120题.md b/2207/C语言精通120题.md index edec402..0ea5834 100644 --- a/2207/C语言精通120题.md +++ b/2207/C语言精通120题.md @@ -22,7 +22,20 @@ int main(void){ 2.输入一个华氏温度,要求输出摄氏温度。公式为c=5/9*(f-32) +```c +#include +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,计算image-20250116004443767