Program in C to find the greatest number among three given number using Macro with arguments
#include<stdio.h> #include<conio.h> #define Max(x,y,z) x>y&&x>z?x:y>z?y:z int main() { int a,b,c; printf("Enter three numbers:-"); scanf("%d%d%d",&a,&b,&c); printf("%d is greater.",Max(a,b,c)); return 0; }
Output:-
0 Comments