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.

  • 1. da is 5% of basic salary
  • 2. hr is 10% of basic salary
  • 3. Gross Salary = basic salary + da + hr

Gross Salary Calculaiton

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);
}

		


		
		Gross Salary Calculaiton
		Figure 1
		
		
		
		result of gross salary calculation
		Figure 2