C program to input the basic salary of an employee and calculate its Gross salary by using the if-else statement

C program to input the basic salary of an employee and calculate its Gross salary by using the if-else statement.

Write the program according to the following:
Basic Salary <= 10000 : HRA = 20%, DA = 80%
Basic Salary <= 20000 : HRA = 25%, DA = 90%
Basic Salary > 20000 : HRA = 30%, DA = 95%

Flowchart of Gross salary program

Flowchart of C program to input the basic salary of an employee and calculate its Gross salary by using the if-else statement

C++ Source Code of Gross salary program

Output

enter the basic salary of the employee.

25000

the gross salary of the employee is

56250

SFT (Shamil’s Flow Table )

Are you interested to Read about SFT(Shamil’s Flow Table)?

 

Latest posts by Prof. Fazal Rehman Shamil (see all)

Buy advertisement space on T4Tutorials

For more details email [email protected]