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

This commit is contained in:
2025-02-17 19:52:50 +08:00
parent 2695e388c8
commit 64f74b12fb
+17
View File
@@ -54,7 +54,24 @@ int main(){
4.编写程序:读入三个整数a,b,c,然后交换它们中的数,使a存放b的值,b存放c的值,c存放a的值。
```c
#include <stdio.h>
/*
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分并把它化为分钟后输出。(从零点整开始计算)。