Sunday, 16 September 2012

Write a program to calculate overtime pay of 10 employees. Overtime is paid at the rate of Rs. 12.00 per hour for every hour worked above 40 hours. Assume that employees do not work for fractional part of an hour.


main()
{
 int time,overtime=0,i;
 printf("Enter the Hours for an employee worked above 40 hours :- ");
 scanf("%d",&time);
 i=1;
 while(i<=time)
 {
  overtime=i*12;
  i++;
 }
 printf("Overtime of this employee is Rs. %d",overtime);
 getch();
}

Output:-

2 comments:

  1. very use full to learn new

    ReplyDelete
  2. Thank you. Am a beginner in c programming language.

    ReplyDelete