P
pnreddy1976
Hi friends,
Please find out the problem in followingcode.
#include<stdio.h>
#include<conio.h>
#define Max(i,j) (i>j)?i:j
int Maximum(int i,intj);
void main()
{
int a,b,c;
a=4;b=5;c=7;
printf("\nMax Value from Maximum
function--->%d",Maximum(a,Maximum(b,c));
printf("\nMax Value from Max Macro-->%d",Maximum(a,Maximum(b,c));
}
int Maximum(int i,intj)
{
if(i>j)
return i;
return j;
}
first state ment giving the exact maximum vale.
But next statement giving wrong.
Please any one tell me where are the wrong??
Thanking you
Reddy
Please find out the problem in followingcode.
#include<stdio.h>
#include<conio.h>
#define Max(i,j) (i>j)?i:j
int Maximum(int i,intj);
void main()
{
int a,b,c;
a=4;b=5;c=7;
printf("\nMax Value from Maximum
function--->%d",Maximum(a,Maximum(b,c));
printf("\nMax Value from Max Macro-->%d",Maximum(a,Maximum(b,c));
}
int Maximum(int i,intj)
{
if(i>j)
return i;
return j;
}
first state ment giving the exact maximum vale.
But next statement giving wrong.
Please any one tell me where are the wrong??
Thanking you
Reddy