作业:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define YEAR_S 365*24*60*60
#define SMALL 'h'
#define BIG 'H'
#define NUM 5
#define N a+b
int main(int argc, const char *argv[])
{
printf("%d\n",YEAR_S);
printf("%c\n",SMALL-32);
printf("%c\n",BIG+32);
printf("%d\n",NUM*NUM);
int a = 1;
int b = 2;
printf("a=%d b=%d\n",N-a,N-b);
return 0;
}
运行结果:
ubuntu@ubuntu:~/wei/d1$ vim year_s.c
ubuntu@ubuntu:~/wei/d1$ gcc year_s.c
ubuntu@ubuntu:~/wei/d1$ ./a.out
31536000
H
h
25
a=2 b=1