#include<stdio.h>
#include<windows.h>
#define MAX(x,y) x>y?x:y
void main()
{
int a, b;
scanf("%d%d", &a, &b);
printf("%d\n", MAX(a, b));
system("pause");
return 0;
}
其中,x>y?x:y为
if (a > b)
return a;
else
return b;
#include<stdio.h>
#include<windows.h>
#define MAX(x,y) x>y?x:y
void main()
{
int a, b;
scanf("%d%d", &a, &b);
printf("%d\n", MAX(a, b));
system("pause");
return 0;
}
if (a > b)
return a;
else
return b;