#include<stdio.h>
#include<conio.h>
void main()
{
int hour,RT,RP,OP,WGP;
float OT;
clrscr();
printf("\n\tEnter the time of the employee works in hours:^");
scanf("%d",&hour);
if(hour>40)
{
RT =hour-40;
OT =RT/1.5;
RP =40*75;
OP =OT*75;
WGP =RP+OP;
printf("\n\tThe Regular Pay is P %d",RP);
printf("\n\tThe Overtime Pay is P %d",OP);
printf("\n\tThe Weekly Gross Pay is P %d",WGP);
}
else
{
RP=hour*75;
printf("\n\tThe Regular Pay is P %d",RP);
}
getch();
}
No comments:
Post a Comment