Monday, 8 April 2013

C++ PROGRAM TO FIND THE LARGEST OF THREE NUMBERS USING INLINE FUNCTION


#include<iostream.h>
#include<conio.h>
inline int large(int x,int y,int z)
{
if(x>y&&x>z)return x;
else if(y>z)return y;
else return z;
}
void main()
{
int x,y,z,big;
clrscr();
cout<<"\nENTER 3 NUMBERS:";
cin>>x>>y>>z;
big=large(x,y,z);
cout<<"\nTHE LARGEST NUMBER="<<big;
getch();
}

No comments:

Post a Comment