WAP to accept the basic salary of a
calculate the following as given below
HRA = 20% of basic salary
DA= 45% of basic salary
Gross salary - Besic salary + HPA+DA
Display the grass salary,
Answers
Answered by
1
Answer:
Program to calculate gross salary of a person
Given an integer basic and a character grade which denotes the basic salary and grade of a person respectively, the task is to find the gross salary of the person.
Gross Salary: The final salary computed after the additions of DA, HRA and other allowances. The formula for Gross Salary is defined as below:
Gross Salary = Basic + HRA + DA + Allow – PF
Here, HRA = 20% of Basic
DA = 50% of basic
Allow = 1700 if grade = ‘A’
Allow = 1500 if grade = ‘B’
Allow = 1300 if grade = ‘C’
PF = 11% of basic
Examples:
Input: basic = 10000, grade = ‘A’
Output: 17600
Input: basic = 4567, grade = ‘B’
Output: 8762
Similar questions