#include
#include
class person
{
int age1,age2,age;
public:
void input()
{
cout<<"\nEnter
two ages:";
cin>>age1>>age2;
}
void show()
{
cout<age<<"is
greater.";
}
int check()
{
if(age1
return
this->age=age2;
else
return
this->age=age1;
}
};
int main()
{
clrscr();
person p;
p.input();
p.check();
p.show();
getch();
return 0;
}
No comments:
Post a Comment