You are on page 1of 2

/* ROLL NO: 1 SEM-1 ICA DIV: A

NAME : VARUN AGGARWAL SUBJECT: FOP


PROGRAM DEFINITION:
Accept
employee code: integer
basic: float
year of experience:integer
qualification:character
G for graduate
P for post graduate
U for under graduate
calculate his allowance as follows
hra=basic*10%
cca=basic*20%
net=basic+hra+cca
find out a grade as follow.
basic grade
<1000 e
>1000 & <2000 d
>2000 & <2500 c
>2500 & <3000 b
>3000 a
display the details of the employee as follows:
employee code:
net:
Grade:
*/

#include<stdio.h>
#include<conio.h>

void main()
{
int eid,ey;
char eq,ga;
float bs,h,c,n;
clrscr();
printf("\n\nEnter Employee Code::");
scanf("%d",&eid);
printf("\nEnter Employee Basic::");
scanf("%f",&bs);
printf("\nEnter Years Of Experiance::");
scanf("%d",&ey);
printf("\nEnter Employee Qualification::");
eq=getch();
putch(eq);
h=bs*0.1;
c=bs*0.2;
n=bs+h+c;
if(bs>=3000)
{
ga='A';
}
else if(bs>2500 && bs<3000)
{
ga='B';
}
else if(bs>2000 && bs<=2500)
{
ga='C';
}
else if(bs>1000 && bs<=2000)
{
ga='D';
}
else if(bs<=1000)
{
ga='E';
}
printf("\n\nDetail Of Employee::");
printf("\n\nEmployee Code :: %d",eid);
printf("\n\nNet::%6.2f",n);
printf("\n\nGrade :: %c",ga);
getch();
}
/* OUTPUT:
Enter Employee Code::007
Enter Employee Basic::25000
Enter Years Of Experiance::25
Enter Employee Qualification::p

Detail Of Employee::
Employee Code :: 7
Net::32500.00
Grade :: A
*/