I'm stuck on figuring out the best to do this assignment. I need to it with either a single array or a 2d array, no structs or classes or anything. Should i just have a 20x8 array and enter the data that way?

A company has records for the hours worked by each employee per week. Each employee's record consists of the hourly rate of pay and seven numbers, representing the hours worked by the employee on the seven days of the week. For example, a typical entry could be the following:
13.25 1.3 7 8 0 4.7 0 0
The first piece of data entered (not shown) is a parameter value, specifying the number of employees (there are no more than 20).

Write a program that reads in the specified data and does the following:

a. For each employee, finds the total number of hours worked for the week.
b. For each employee, finds the weekly pay my multiplying the hours worked by the rate per hour.
c. Finds the number of employees absent on each day of the week. An employee is considered absent on a given day if the hours worked are equal to 0.
d. Find which day has the most absentees.

10 Years
Discussion Span
Last Post by Ancient Dragon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.