In a company an employee is paid as under: If his basic salary is less than 5000 then he’ll get 10% of his base salary as HRA and 90% of his base salary as DA. If his basic salary is above 5000, then he’ll get 600 HRA and 95% of his base salary as DA.
HRA – House Rent Allowance.
DA – Dearness Allowance.
C Program to Calculate Gross Salary of an Employee
YouTube Link: https://www.youtube.com/watch?v=qqbhNjWedLw [Watch the Video In Full Screen.]
Source Code: Calculate Gross Salary of an employee
#include
int main()
{
float bs, gs, da, hra;
printf("Enter basic salary\n");
scanf("%f", &bs);
if( bs
Output 1:
Enter basic salary
5500
Gross Salary is Rs 11325.000000
Output 2:
Enter basic salary
4000
Gross Salary is Rs 8000.000000
Formula to calculate Gross Salary is:
Gross Salary = Basic Salary + Dearness allowance + House Rent Allowance.
For full C programming language free video tutorial list visit:C Programming: Beginner To Advance To Expert