Task#5 Assignment in C++
#include<iostream>
using namespace std;
const int MAX=21;
struct Student
{
string RollNo;
string Name;
string RegNo;
};
int main()
{
Student Stds[MAX];
for(int i=1;i<=20;i++)
{
cout<<"\nEnter Data of Employee:\t"<<i<<endl;
cout<<"Enter Name of Employee "<<i<<"\t";cin>>Stds[i].Name;
cout<<"Enter Registration-Number of Employee "<<i<<"\t";cin>>Stds[i].RegNo;
cout<<"Enter Roll-Number of Employee "<<i<<"\t";cin>>Stds[i].RollNo;
}cout<<"\n\n\n\n\n\n\n\n";
for(int i=1;i<=20;i++)
{
cout<<"\nData of Employee"<<i<<endl;
cout<<"Name of Employee "<<i<<"\t";cout<<Stds[i].Name<<endl;
cout<<"Registration-Number of Employee "<<i<<"\t";cout<<Stds[i].RegNo<<endl;
cout<<"Roll-Number of Employee "<<i<<"\t";cout<<Stds[i].RollNo<<endl;
}
}
Comments
Post a Comment