#include<iostream.h>
#include<stdio.h>
#include<conio.h>
class Person
{
char Name[20];
int Age;
public:
void getData()
{
cout<<"Enter Person Name:";
gets(Name);
cout<<"Enter Person Age:";
cin>>Age;
}
void putData()
{
cout<<"\n\nDetails About Eldest
Person as follows:";
cout<<"\nName="<<Name<<"\nAge="<<Age;
}
Person &Compare(Person &p1)
{
if(p1.Age>this->Age)
return
p1;
return
*this;
}
};
void main()
{
clrscr(); Person x,y,z;
x.getData();
y.getData();
z=x.Compare(y);
z.putData();
getch();
}
Output:
ReplyDeleteThanks for talking about amazing details with us. I really liked it of the details, This is truly amazing material.
Laptop Repairing Course in Delhi
LED LCD Repairing Institute in Delhi
LED LCD Repairing Course in Delhi
Mobile Repairing Institute in Laxmi Nagar
Mobile Repairing Institute in Delhi
Mobile Repairing Course in Delhi
Mobile Repairing Course in Laxmi Nagar
Your website looks clear and content is amazing, which theme did you used ? if you are looking for php tutorial then you may click here
ReplyDelete