[HELP] Program to compute an Emplyee's daily wage

Problem Description.

You are hired by a small company to create a program that computes the daily wage of its employees.

The employees are required to time-in when they arrive to work and time-out when they leave work.

The company's regular working hours is from 8 A.M. to 5 P.M.

Lunch break, which is mandatory, is from 12:00 noon to 1 P.M. During lunch break, the company closes its office and forces every employee to eat lunch. The employees are not required to time-out and time-in during the lunch break.

There is no early time-in. Any time-in before 8:00 A.M. is considered as coming in at exactly 8:00 A.M.

Over-time is considered only if the employee has already worked for at least 8 hours.

The regular hourly wage of the company for all employees is 40 pesos. The overtime hourly wage for all employees
is 60 pesos.

Problem Specification.

Create a C++ program that computes the daily wage of the company's employees.
The program asks for the time-in and time-out information of an employee. The input will be four numbers separated by
a space (or a newline). The first two numbers correspond to the time the employee arrived. The last two numbers correspond the time the employee left for the day.
For example if the employee arrived at 8:30 A.M. and left at 5:15 P.M., the input is 8 30 5 15

The program prints as its output the following:
1) the employee's total regular working hours
2) the employee's total overtime
3) the daily regular wage
4) the daily overtime wage
5) the daily total wage (regular + OT)


I have been going at this for a week now but I really can't solve it. I'll fail my course if I don't get this problem. I'd be very very very grateful to anyone who can help me solve this problem. Hints? Clues?
What do you have so far? What are you specific questions?
Topic archived. No new replies allowed.