Monday, February 16, 2009

Exer 6 CS 121

Photobucket


#include
#include

int salary, years, bonus=0, sum=0;
void main(){
clrscr();
printf("\nEnter Salary of employee: P");
scanf("%d", &salary);
printf("\nEnter Years of Service of employee: ");
scanf("%d", &years);
printf("\n=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=");
if (years==1){
bonus=salary*0.10;
sum=bonus+salary;
printf("\n\n>>>Bonus of employee: P%d", bonus);
printf("\n>>>Total Salary of employee is P%d", sum);
printf("\n\n\n\n\t\t\t_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_");
printf("\n\n\t\t\tC O N G R A T U L A T I O N S!!!");
}
else if (years<=5 && years>=2){
bonus=salary*0.20;
sum=bonus+salary;
printf("\n\n>>>Bonus of employee: P%d", bonus);
printf("\n>>>Total Salary of employee is P%d", sum);
printf("\n\n\n\n\t\t\t_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_");
printf("\n\n\t\t\tC O N G R A T U L A T I O N S!!!");
}
else if ((years<=10) && (years>=6)){
bonus=salary*0.50 ;
sum=bonus+salary;
printf("\n\n>>>Bonus of employee: P%d", bonus);
printf("\n>>>Total Salary of employee is P%d", sum);
printf("\n\n\n\n\t\t\t_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_");
printf("\n\n\t\t\tC O N G R A T U L A T I O N S!!!");
}
else if (years<=11){ bonus=salary*0.75; sum=bonus+salary; printf("\n\n>>>Bonus of employee: P%d", bonus);
printf("\n>>>Total Salary of employee is P%d", sum);
printf("\n\n\n\n\t\t\t_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_");
printf("\n\n\t\tC O N G R A T U L A T I O N S!!!");
}

printf("\n\n\t\t\t ~-<<>>-~");
printf("\n\t\t\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
printf("\n\n\n\t\t\t\t Programmed by: Sherluck L. Mercado");
printf("\n\t\t\t\t\t\tCS121(5820) / 12:30-2:30 / H1I");

getch();
}

No comments:

Post a Comment