Monday, August 1, 2016

SALARY OF EMPLOYEE- C Program

/*SALARY OF EMPLOYEE*/

#include<conio.h>
#include<stdio.h>
#include<math.h>
void main()
{
float ba,da,hra,ta,d,h,t,to;
clrscr();
printf("Enter basic salary of an employee:");
scanf("%f",&ba);
printf("\nEnter the value of DA in %:");
scanf("%f",&da);
printf("Enter the value of TA in %:");
scanf("%f",&ta);
printf("Enter the value of HRA in %:");
scanf("%f",&hra);
d=(ba*da)/100;
h=(ba*hra)/100;
t=(ta*ba)/100;
to=t+d+h+ba;
printf("The total pay of an employee=%f",to);
getch();
}

/************************OUTPUT***************************
Enter basic salary of an employee:1000
Enter the value of DA in %: 2
Enter the value of TA in %:3
Enter the value of HRA in %:5
The total pay of an employee=1100.000000*/





No comments:

Post a Comment