Docsity

C++ Program to Create and Display Employee Records, Thesis of Data Structures and Algorithms

Toggle sidebar
bg1
#include<iostream>
using namespace std;
class employee{
int id; char name[30];
public:
void getData(){
cout<<endl<<"Enter Employee ID: "; cin>>id;
cout<<endl<<"Enter Employee Name: "; cin>>name;
}
void putData(){
cout<<endl<<"Employee ID is: "<<id<<"\t"<<"Employee Name is: "<<name;
} };
int main(){
employee e[1];
for (int i = 0; i < 1; i++){
cout<<endl<<"Enter details of"<<i+1<<"Employee"; e[i].getData();
}
cout<<endl<<"Details of Employees";
for (int i = 0; i < 1; i++){
e[i].putData();
}
return 0; }

Partial preview of the text

Download C++ Program to Create and Display Employee Records and more Thesis Data Structures and Algorithms in PDF only on Docsity!

#include using namespace std; class employee{ int id; char name[30]; public: void getData(){ cout<<endl<<"Enter Employee ID: "; cin>>id; cout<<endl<<"Enter Employee Name: "; cin>>name; } void putData(){ cout<<endl<<"Employee ID is: "<<id<<"\t"<<"Employee Name is: "<<name; } }; int main(){ employee e[1]; for (int i = 0; i < 1; i++){ cout<<endl<<"Enter details of"<<i+1<<"Employee"; e[i].getData(); } cout<<endl<<"Details of Employees"; for (int i = 0; i < 1; i++){ e[i].putData(); } return 0; }