HOW TO FIND NET AND GROSS PAY OF AN EMPLOYEE (for 10 Employee)
PROGRAM
#include<stdio.h>
#include<conio.h>
void main(void)
{
int f;
char a[65];
float basic,hmallow,pf,insurance,net,gross;
printf("\nUSE UNDERSCORE INSTEAD OF SPACE");
for(f=1;f<=10;f++)
{
printf("\nEnter a Employee Name:");
scanf("%s",&a);
printf("\n Enter your basic selary:");
scanf("%f",&basic);
printf("\n Enter your House And Medical allowance:");
scanf("%f",&hmallow);
printf("\n Enter your provident fund:");
scanf("%f",&pf);
printf("\n Enter your insurance amount:");
scanf("%f",&insurance);
gross=basic+hmallow;
net=gross-(pf+insurance);
printf("\nSalary slip");
printf("\nBasic salary:%2f",basic);
printf("\nHouse And Medical allowance:%2f",hmallow);
printf("\nGross salary:%2fRupees",gross);
printf("\nDeduction:");
printf("\nProvident fund:%2f",pf);
printf("\nInsurance:%2f",insurance);
printf("\nNet Salary:%2fRupees",net);
}
}
OUTPUT
USE UNDERSCORE INSTEAD OF SPACE
Enter a Employee Name:KHALID_AMIN
Enter your basic selary:4000
Enter your House And Medical allowance:34
Enter your provident fund:35
Enter your insurance amount:54
Salary slip
Basic salary:4000.000000
House And Medical allowance:34.000000
Gross salary:4034.000000Rupees
Deduction:
Provident fund:35.000000
Insurance:54.000000
Net Salary:3945.000000Rupees
Enter a Employee Name:
.
.
.
.
.
.
.
.
Comments
Post a Comment