Enter Employee Number And Show Their Data OoP C++

Enter Employee Number And Show Their Data OoP C++

Just open your c++ compiler Paste this code.


#include<iostream>
using namespace std;
class employee
{
private :
int a,b,c,d,e,f;
public :
employee(int a1,int b1,int c1)
{
a1=a;
b1=b;
c1=c;

}/*
void data()
{
int a,b,c;
cout<<"Enter 1st Employee Data :";
cin>>a;
cout<<"Enter 2nd Employee Data :";
cin>>b;
cout<<"Enter 3rd Employee Data :";
cin>>c;
}*/
void showdata()
{
cout<<"first Employee Data is :"<<a;
cout<<"Seceond Employee Data is :"<<b;
cout<<"Third Employee Data is :"<<c;
}
};
int mian()
{

employee em;
em.employee(11,14,16);
em.showdata();

}

0 comments: