C Program - The basic salary of an employee is decided at the time of employment, which may be different for different employees. Apart from basic employee gets 10% of basic as house rent, 30& basic as dearness allowance. A professional tax 5% of basic is deducted from salary. Accept the employee id and basic salary for an employee and output the take home salary of the employee

Program

#include <stdio.h>
#include<math.h>
int main()
{
int id;
float m, bsalary,da, tax,house_rate;
printf("enter emp id :");
scanf("%d",&id);
printf("enter  the basic salary : ");
scanf("%f",&bsalary);
house_rate = (bsalary * 0.1);
da = (bsalary * 0.3);
tax= (bsalary * 0.05);
m=bsalary + ((house_rate+da)-tax);
printf("id : %d salary : %f",id,m);
}


Output:

enter emp id :342
enter  the basic salary : 65342
id : 342 salary : 88211.703125

Post a Comment

1 Comments

  1. Navigating P. Tax in Andhra Pradesh can be tricky, but Digiliance makes it simple. Their content covers everything — from who needs to pay to how to register and file. As a startup founder, their platform saved me hours of research and confusion. I’ve even shared their articles with my HR team. If you're tired of outdated or vague compliance info, Digiliance is the trusted resource you need.

    ReplyDelete