Write a program to calculate the total salary of a person. The user has to enter the basic salary (an integer) and the grade (an uppercase character), depending upon which the total salary is calculated as:
Total_salary = Basic + HRA + DA + Allow – PF
where :
HRA = 20% of basic
DA = 50% of basic
Allow = 1700 if grade = ‘A’
Allow = 1500 if grade = ‘B’
Allow = 1300 if grade = ‘C' or any other character
PF = 11% of basic.
Round off the total salary and then print the integral part only.
Note for C++ users :
To round off the value, please include<cmath> library at the start of the program and round off the values in this way.
int ans = round(yourFinalValue);
Input format :
Basic salary & Grade (separated by space)
Output Format :
Total Salary
Constraints
0<=salary<=10000