EQuestionAnswers.com Computer/Electronics Questions and Answers
C, C++, VC++, COM/DCOM, DLL and more
#Login #Sign up  Facebook Twitter TGoogle+
 

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;
10    pf = (12 * (bs + da)) / 100;
11    gs = bs + da + hra + 300;
12    ns = gs - pf;
13    printf("\n Net salary of the employee is: %f", ns);
14    printf("\n Gross Salary : %f , D.A : %f, H.R.A. : %f, P.F. : %f", gs, da, hra, pf);
15  }

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