adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Program in C to find the greatest number among three given number using Macro with arguments

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:-


Post a Comment

0 Comments