### Help with multi dimensional arrays!

Hello! Could come help me get started with this program?

Write a program using a multi-dimensional array that allows the user to enter payroll data for a business. Each week the employees receive pay based on the hours worked. The user wants to be able to record gross pay by the week for 4 weeks for each of the 4 employees. The program prompts the user to enter the amount for an employee in a certain week.

(This is an example of how the data should be coming on the screen)
Enter the weekly pay for employee 1 for week 1: 656.75
Enter the weekly pay for employee 2 for week 1: 825.99
Enter the weekly pay for employee 3 for week 1: 456.75
Enter the weekly pay for employee 4 for week 1: 786.75

Enter the weekly pay for employee 1 for week 2: 934,67
Enter the weekly pay for employee 2 for week 2: 825.99
Enter the weekly pay for employee 3 for week 2: 456.75
Enter the weekly pay for employee 4 for week 2: 786.75

I have been trying to start this assignment for a bit, and just cant seem to do it properly.
Last edited on
const int weeks = 4;
const int emps = 4;

double data[emps][weeks];
//remember that arrays are 0-n-1, not 1-n in this language.
data[0][0] = 656.75; //employee 1 week 1
data[3][1] = 786.75; //employee 4 week 2
Last edited on
the bottom half

Enter the weekly pay for employee 1 for week 1: 656.75
Enter the weekly pay for employee 2 for week 1: 825.99
Enter the weekly pay for employee 3 for week 1: 456.75
Enter the weekly pay for employee 4 for week 1: 786.75

Enter the weekly pay for employee 1 for week 2: 934,67
Enter the weekly pay for employee 2 for week 2: 825.99
Enter the weekly pay for employee 3 for week 2: 456.75
Enter the weekly pay for employee 4 for week 2: 786.75

all that is just an example of how the program should be running, i do not need to add that into the code
Pseudocode is always a good start once you know how a 2d array works:

1. Setup variables
2. Setup array[employees][weeks]

loop::