bsc

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

root / semester_1 / tuition-c / P009.c

P009.c (520B)


      1 /* WAP to calculate gross and net salary
      2 by accepting basic salary as input.
      3 IMP :	DA = 30% of Basic Pay
      4 		HRA = 20% of Basic Pay
      5 		PF = 12.5% of Basic Pay
      6  Gross Salary = Basic Pay + DA + HRA
      7  Net Salary = Gross Salary - PF
      8 */
      9 
     10 #include<stdio.h>
     11 int main() {
     12 	double bs, da, hra, pf, gs, ns;
     13 	printf("Enter the Basic Salary : ");
     14 	scanf("%lf", &bs);
     15 	da = bs * 0.3;
     16 	hra = bs * 0.2;
     17 	pf = bs * 0.125;
     18 	gs = bs + da + hra;
     19 	ns = gs - pf;
     20 	printf("\nGross Salary : %lf"
     21 		   "\nNet Salary   : %lf", gs, ns);
     22 	return 0;
     23 }
© 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