Calculate Gross salary of a person

#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

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post