- #include<stdio.h>
- #define MAX(A,B) A>B?(A):(B)
- void main()
- {
- int a=1,b=2,c=3,d=4,t;
- t=MAX(a+b,c+d);
- printf("%d\n",t);
- }
输出为7 没问题
- #include<stdio.h>
- #define MAX(A,B) A>B?(2*A):(2*B)
- void main()
- {
- int a=1,b=2,c=3,d=4,t;
- t=MAX(a+b,c+d);
- printf("%d\n",t);
- }
输出为10 为什么不是14啊
谢谢
|