C Program to calculate Gross Salary. In this program we will take basic salary as an input and on the basis of following calculation we calculate gross salary.
In the following program we calculate gross salary from basic salary.
#include<stdio.h>
void main()
{
long int gs,bs, da, hr;
printf("Enter your Basic Salary \n");
scanf("%ld",&bs);
da=(bs*5)/100;
hr= (bs*10)/100;
gs=bs+da+hr;
printf("\nGross Salary is %ld",gs);
}
Figure 1
Figure 2