From 64f74b12fb7e65102adb3d90f21939588c687fb9 Mon Sep 17 00:00:00 2001 From: smallkun Date: Mon, 17 Feb 2025 19:52:50 +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 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/2207/C语言精通120题.md b/2207/C语言精通120题.md index b8e7c3c..86da3f0 100644 --- a/2207/C语言精通120题.md +++ b/2207/C语言精通120题.md @@ -54,7 +54,24 @@ int main(){ 4.编写程序:读入三个整数a,b,c,然后交换它们中的数,使a存放b的值,b存放c的值,c存放a的值。 +```c +#include +/* +4.编写程序:读入三个整数a,b,c,然后交换它们中的数, +使a存放b的值,b存放c的值,c存放a的值。 +*/ +int main(){ + int a, b, c, temp; + scanf("%d %d %d", &a, &b, &c); + temp = a; + a = b; + b = c; + c = temp; + printf("%d %d %d\n", a, b, c); + return 0; +} +``` 5.编写程序:输入9时23分并把它化为分钟后输出。(从零点整开始计算)。