Computer Science, asked by Rishikakomal, 1 year ago

write a Python program calculate the salary of an employee by using salary equals to basic salary + H R A minus Income Tax assume that employees are categorised into 2 grade 1 and Grade 2 if the employees belong to grade 1 hr calculated 15% basic salary and calculate 30% basic salary if the employee belong to read 2001 calculated 10% basic salary and calculated 25% of basic salary and for both grade employees income tax will be calculated as 5% of basic salary​

Answers

Answered by kavyadhar7p3w3oz
5

Explanation:

** * C program to calculate gross salary of an employee */ #include <stdio.h> int main() { float basic, gross, da, hra; /* Input basic salary of employee */ printf("Enter basic salary of an employee: "); scanf("%f", &basic); /* Calculate D.A and H.R.A according to specified conditions */ if(basic <= 10000) { da = basic * 0.8; hra = basic * 0.2; } else if(basic <= 20000) { da = basic * 0.9; hra = basic * 0.25; } else { da = basic * 0.95; hra = basic * 0.3; } /* Calculate gross salary */ gross = basic + hra + da; printf("GROSS SALARY OF EMPLOYEE = %.2f", gross); return 0;

Similar questions