Write a program to find the net salary of the employee.

Source Code

#include<stdio.h>

int main (int argc, char *argv[])
{
  float bs = 0, gs = 0, ns = 0, pf = 0, da = 0, hra = 0;
  printf("\n Enter the basic salary of the Employee:");
  scanf("%f", &bs);
  da = (22 * bs) / 100;
  hra = (15 * bs) / 100;
  pf = (12 * (bs + da)) / 100;
  gs = bs + da + hra + 300;
  ns = gs - pf;
  printf("\n Net salary of the employee is: %f", ns);
  printf("\n Gross Salary : %f , D.A : %f, H.R.A. : %f, P.F. : %f", gs, da, hra, pf);
}

Find More from our code collection
Armstrong number, binary number to a decimal number, bubble sort, decimal number to binary number, factorial of the given number factors, fibonacci numbers, HCF and LCM, matrix, mergesort, salary of the employee. palindrome, quadratic equation, star patterns, series etc. and much more...
#Return to Example Source Code