Why this is not giving the desired output ? For Ex - take a=1,b=2,c=3,d=4 It is giving MAX4() = 2 while it should be 4 in this case.
#include<stdio.h>
#define MAX4(a,b,c,d) MAX2(MAX2(a,b),MAX2(c,d))
#define MAX2(a,b) a>b?a:b
int a,b,c,d;
int main(){
/*printf("Please enter 2 integers - \n");
scanf("%d %d",&a,&b);
printf("The maximum number among them is %d\n",MAX2(a,b));
*/
printf("Please enter 4 integers - \n");
scanf("%d %d %d %d",&a,&b,&c,&d);
printf("The maximum number among them is %d\n",MAX4(a,b,c,d));//,MAX2(a,b),MAX2(c,d));
return 0;
}