APC-PRAC-007.c (790B)
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 that accept basic salary of an employee and display gross salary, 8 net salary generated by below formula. 9 DA = 25% of the basic salary. 10 HRA = 12.5% of the basic salary. 11 PF = 10% of the basic salary. 12 gross salary = basic salary + da + hra 13 net salary = gross salary - pf 14 */ 15 16 #include <stdio.h> 17 int main() 18 { 19 double bs, gs, ns, da, hra, pf; 20 printf("Enter the basic salary of the employee : "); 21 scanf("%lf", &bs); 22 da = bs * 0.25; 23 hra = bs * 0.125; 24 pf = bs * 0.10; 25 gs = bs + da + hra; 26 ns = gs - pf; 27 printf("\nGross Salary : %g" 28 "\nNet Salary : %g", 29 gs, ns); 30 return 0; 31 }