#include<iostream.h>
#include<conio.h>
class employee
{
int emp_no;
char emp_name[20];
float emp_sal;
public:
void get();
void dis();
};
void employee::get()
{
cout<<"Enter employee number:";
cin>>emp_no;
cout<<"Enter employee name:";
cin>>emp_name;
cout<<"Enter salary:";
cin>>emp_sal;
}
void employee::dis()
{
cout<<"\n\tEmployee Details";
cout<<"\n\t Number : "<<emp_no;
cout<<"\n\t Name : "<<emp_name;
cout<<"\n\t Salary : "<<emp_sal;
}
void main()
{
clrscr();
employee e;
e.get();
e.dis();
getch();
}
This comment has been removed by the author.
ReplyDeleteThank you so much
ReplyDeleteCool
ReplyDeleteThank you so much
ReplyDeletei think it won't work for 100 employees
ReplyDeleteWould u plz attach the output
ReplyDeletePlease attach output
ReplyDelete