Tassk 1

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

#include<iostream>

#include<conio.h>
using namespace std;
class employee
{
private:
string emp_id;
char emp_name[20];
float salery;
int age;
int joining_date;
char address[20];
public:
void getempdetails()
{
cout<<"\n\n\tEnter the employee id number:-";
cin>>emp_id;
cout<<"\n\n\tEnter the employee name:-";
cin>>emp_name;
cout<<"\n\n\tEnter the employee salary:-";
cin>>salery;
cout<<"\n\n\tEnter the age:-";
cin>>age;
cout<<"\n\n\tEnter the joining_date:-";
cin>>joining_date;
cout<<"\n\n\tEnter the address:-";
cin>>address;

}
void showempdata()
{
cout<<"\nEmploye details..,";
cout<<"\n\n\t the name of employe:-"<<emp_name;
cout<<"\n\n\tthe employee id number:-"<<emp_id;
cout<<"\n\n\tthe employee salery:-"<<salery;
cout<<"\n\n\tthe employee age:-"<<age;
cout<<"\n\n\tthe employee joining date:-"<<joining_date;
cout<<"\n\n\tthe employee address:="<<address;

};
int main()
{
employee e1;
e1.getempdetails();
e1.showempdata();
return 0;

You might also like