How to calculate gross salary of a person using C Program


#include <stdio.h>
 
int main() {
   int gross_salary, basic, da, ta;
 
   printf("Enter basic salary : ");
   scanf("%d", &basic);
 
   da = (10 * basic) / 100;
   ta = (12 * basic) / 100;
 
   gross_salary = basic + da + ta;
 
   printf("\nGross salary : %d", gross_salary);
   return (0);
}

Output :


Enter basic Salary : 1000
Gross Salart : 1220
How to calculate gross salary of a person using C Program

Published on 16-Dec-2021 15:48:12

You may also like this!