Filled Under:

C Program to Calculate Gross Salary of an Employee


C Program to Calculate Gross Salary of an Employee

C Program to Calculate Gross Salary of an Employee


C program to calculate gross salary of a person. 

D.A= 74%of salary.
H.R.A=15%of salary.
Salary=D.A+H.R.A.

-----------------------------------------------------------------------------------------
#include<stdio.h>
void main()
{float salary,da,hra,income;
printf("Enter the salary:\n");
scanf("%f",&salary);
da=.74*salary;
hra=.15*salary;
income=salary+da+hra;
printf("The income is:%f \n",income);
}



------------------------------------------------------------------------------------------

Just copy and paste the program in your desired compiler (Dev C++ is more preferable) and run it.

Enjoy programming in C.




0 comments:

Post a Comment

 

Copyright 2020 Programming in C All Right Reserved