1 #include <stdio.h>
2 #include <string.h>
3 #include <stdlib.h>
4 #define YEAR_PING 365*24*60*60
5 #define YEAR_RUN 366*24*60*60
6 #define BIG ('h'-32)
7 #define SMALL ('H'+32)
8 #define PINGFANG 5*5
9 #define SWAP(a,b) a=a^b;b=a^b;a=a^b;
10 int main(int argc, const char *argv[])
11 {
12 printf("平年有%ds\n", YEAR_PING);
13 printf("闰年有%ds\n", YEAR_RUN);
14 printf("h大写:%c\n", BIG);
15 printf("H小写:%c\n", SMALL);
16 printf("5^2=%d\n", PINGFANG);
17 int a = 100;
18 int b = 500;
19 SWAP(a,b);
20 printf("a = %d,b = %d\n", a, b);
21 return 0;
22 }
23
~
~
20240702 作业
于 2024-07-02 20:48:19 首次发布