-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasic_Salary.cpp
More file actions
47 lines (35 loc) · 804 Bytes
/
Basic_Salary.cpp
File metadata and controls
47 lines (35 loc) · 804 Bytes
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
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int BS , DA , HRA , TA , age , experience;
BS = 12000;
string name;
cout<<"Enter your Name:"<<endl;
cin>>name;
cout<<"Enter your Age:"<<endl;
cin>>age;
cout<<"Enter your Experience: "<<endl;
cin>>experience;
if ((experience < 3) && (age>=20)){
DA = 0.01 * BS;
HRA = 0.10 * BS;
TA = 0.05 * BS;
}
else if ((experience< 5) && (experience>3) && (age < 35) && (age>=20)){
DA = 0.02 * BS;
HRA = 0.15 * BS;
TA = 0.07 * BS;
}
else if ((experience>=5) && (age>=35)){
DA = 0.05 * BS;
HRA = 0.20 * BS;
TA = 0.09 * BS;
}
else if(age<20){
cout<<"Not Applicable for Job";
}
BS = DA + TA + HRA;
cout<<"Basic Salary is: "<<BS;
return 0;
}