bsc

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

P009.c (657B)


      1 /*
      2  * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025
      3  * Repo: https://github.com/notamitgamer/bsc
      4  * License: MIT
      5  */
      6 
      7 /* WAP to calculate gross and net salary
      8 by accepting basic salary as input.
      9 IMP :	DA = 30% of Basic Pay
     10 		HRA = 20% of Basic Pay
     11 		PF = 12.5% of Basic Pay
     12  Gross Salary = Basic Pay + DA + HRA
     13  Net Salary = Gross Salary - PF
     14 */
     15 
     16 #include<stdio.h>
     17 int main() {
     18 	double bs, da, hra, pf, gs, ns;
     19 	printf("Enter the Basic Salary : ");
     20 	scanf("%lf", &bs);
     21 	da = bs * 0.3;
     22 	hra = bs * 0.2;
     23 	pf = bs * 0.125;
     24 	gs = bs + da + hra;
     25 	ns = gs - pf;
     26 	printf("\nGross Salary : %lf"
     27 		   "\nNet Salary   : %lf", gs, ns);
     28 	return 0;
     29 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror