-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
70 lines (47 loc) · 1.53 KB
/
main.cpp
File metadata and controls
70 lines (47 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include<iostream>
#include<fstream>
#include<stdio.h>
using namespace std;
class emp
{
char name[25],gender,fnam[25];
int eno;
float basic;
public:
void input()
{
cout<<"\nName:";
gets(name);
cout<<"Gender :";
cin>>gender;
cout<<"Father's name :";
cin>>fnam;
cout<<"Enter the employee number assigned :";
cin>>eno;
cout<<"Basic Pay :";
cin>>basic;
}
void output()
{
cout<<"Name :";
puts(name);
cout<<"Gender :";
cout<<gender;
cout<<"\nFather's name :";
puts(fnam);
cout<<"Employee number :";
cout<<eno;
cout<<"\nBasic Pay :";
cout<<basic<<endl<<endl;
}
};
int main()
{
emp e;
cout<<"\nEnter details of the employee\n\n";
e.input();
cout << "\x1b[2J\x1b[1;1H" << flush;
cout<<"\nDetails entered are \n\n";
e.output();
return 0;
}