Computer Science, asked by vedar2478, 1 year ago

Write a c++ program to implement class of a person containing name and age

Answers

Answered by amitdubey1999
1
class person
{ int age;
char name[100];

public:
void implem()
{cout<<"enter name";
cin>>name;
cout<<"enter age";
cin>>age;
}
void disp()
{
cout<<name;
cout<<age;
}
};
int main()
{
int x;
x.implem;
x.disp;

return 0;
}

hope it helps....
Similar questions