Efren Castro wrote:
>
> Hi everyone,
> I am currently working on a BONUS program in COBOL. I
> need some kind of formula to figure out my problem, but
> I just cant figure it out. Maybe some of you can come
> up with something. Heres the problem.
>
> Minimum to be given = $500.00
> Maximum to be given = $1500.00
> Total Budget = $75,000.00
> Total Employees = about 80
>
> Any employee who misses over 160 will not qualify for
> bonus. any help will be appreciated.
How about:
Total_Employee_Hours = sum (employee_hours_worked_for_the_year)
Total_Bonus = 75000
Perform Until No_more_employees
If Total_Bonus < 0
Error
End-if
If employee_hours_worked_for_the_year > 1920 [2080 - 160]
Bonus = 75000 * (employee_hours_worked_for_the_year /
Total_Employee_Hours)
If Bonus < 500
Bonus = 500
Else
If Bonus > 1500
Bonus = 1500
End-if
End-if
Total_Bonus = Total_Bonus - Bonus
End-if
End-perform
Jim Phillips Manager of Information Systems
Voice: (330) 527-2124 Therm-O-Link, Inc.
Fax: (330) 527-2123 PO Box 285; 10513 Freedom St.
Email: [log in to unmask] Garrettsville, Ohio 44231