#include<stdio.h>
#define MAX(x,y) ((x)>(y)?(x):(y))
int main()
{
int a = 1;
int b = 2;
int ret = MAX(a, b);
printf("max=%d\n", ret);
return 0;
}
使用宏实现两个数中求较大值
最新推荐文章于 2024-03-25 15:52:53 发布
#include<stdio.h>
#define MAX(x,y) ((x)>(y)?(x):(y))
int main()
{
int a = 1;
int b = 2;
int ret = MAX(a, b);
printf("max=%d\n", ret);
return 0;
}