#include<iostream.h>
#include<conio.h>
class max
{
int x;
int y;
public:
max(int a,int b)
{
x=a;
y=b;
}
void disp()
{
cout<<"\n\nFirst integer is : "<<x;
cout<<"\n\nSecond integer is : "<<y;
}
int maximum();
};
inline int max :: maximum()
{
return(x>y?x:y);
}
int main()
{
int n;
clrscr();
max m(10,20);
m.disp();
n=m.maximum();
cout<<"\n\nMaximum of two integer number is : ";
cout<<n;
getch();
return 0;
}
Post a Comment