We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b0da23 commit e5005a6Copy full SHA for e5005a6
Ques13.cpp
@@ -0,0 +1,38 @@
1
+#include <iostream>
2
+using namespace std;
3
+
4
+int main()
5
+{
6
+ int basicPay;
7
+ double houseRent, medicalAllowance, conveyanceAllowance, netPay;
8
9
+ cout << "Enter the basic pay: ";
10
+ cin >> basicPay;
11
12
+ houseRent = 45 * basicPay;
13
14
+ if (basicPay > 5000)
15
+ {
16
+ medicalAllowance = 0.2 * basicPay;
17
+ }
18
+ else
19
20
+ medicalAllowance = 0.5 * basicPay;
21
22
23
24
25
+ conveyanceAllowance = 200;
26
27
28
29
+ conveyanceAllowance = 100;
30
31
+ //6000 //270000 //120 //200
32
+ netPay = basicPay + houseRent + medicalAllowance + conveyanceAllowance ;
33
+ //4000 //180000 //200 //100
34
35
+ cout << "The net pay of an employee is: " << netPay << " rupees." << endl;
36
37
+ return 0;
38
+}
0 commit comments