Write the pseudocode to solve the problem below. Marks will be awarded for meaningful
comments.
The HR manager has requested that the IT department create a salary report for the CEO. This
task has been assigned to you. The report will be for three departments and five employees
spread across those departments. The HR manager has asked for you to make allowances for the
following data, which is required for the report:
• Employee’s name (five employees)
• Department 1, 2, or 3 (each employee belongs to a department)
• The monthly salary for each employee.
Declare and initialise three parallel arrays using the values shown in the arrays below. Do not ask
the user to input values. The arrays are already sorted on the values in the department array.
Employee name
Bongi Tyrone Priya Joseph Jason
0 1 2 3 4
Department
1 1 2 2 3
0 1 2 3 4
Monthly Salary
33000 25000 85000 12000 50000
0 1 2 3 4
Your solution must do the following:
1. declare and initialise variables and the three parallel arrays.
2. input values into the three parallel arrays. You do not need to consider error handling on
the input; assume that the user never makes a mistake (unlikely, but we are not concerned
about it for this assignment).
23; 24 2024
© The Independent Institute of Education (Pty) Ltd 2024
Page 5 of 7
3. calculate the average salary per department.
4. display the report.
Calculate the average monthly salary per department and print the report. The average monthly
salary must be calculated for each department. The department number must not be repeated for
each employee. The department number is only displayed when there is a new department.