#include <iostream>
using namespace std;
class manager
{
int salary,age;
char name [30];
public:
void getdata()
{
cout<<"enter the name "<<endl;
cin>>name;
cout<<"enter the salary"<<endl;
cin>>salary;
cout<<"enter the age "<<endl;
cin>>age;
}
void display()
{
cout<<"name "<<name<<endl;
cout<<"salary "<<salary<<endl;
cout<<"age "<<age<<endl;
}
};
int main()
{ manager a[10];
int n,i;
cout<<"enter the number of managers"<<endl;
cin>>n;
for(i=0;i<n;i++)
{
a[i].getdata();
}
for(i=0;i<n;i++)
{
a[i].display();
}
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: