bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / tuition-c / APC-PRAC-007.c

APC-PRAC-007.c (654B)


      1 /* WAP that accept basic salary of an employee and display gross salary,
      2 net salary generated by below formula.
      3     DA = 25% of the basic salary.
      4     HRA = 12.5% of the basic salary.
      5     PF = 10% of the basic salary.
      6     gross salary = basic salary + da + hra
      7     net salary = gross salary - pf
      8 */
      9 
     10 #include <stdio.h>
     11 int main()
     12 {
     13     double bs, gs, ns, da, hra, pf;
     14     printf("Enter the basic salary of the employee : ");
     15     scanf("%lf", &bs);
     16     da = bs * 0.25;
     17     hra = bs * 0.125;
     18     pf = bs * 0.10;
     19     gs = bs + da + hra;
     20     ns = gs - pf;
     21     printf("\nGross Salary : %g"
     22            "\nNet Salary   : %g",
     23            gs, ns);
     24     return 0;
     25 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror