Question: Do the following modification to exercises 1 & 2 ( not included in Textbook Program 7 - 2 ) : Ask the user the number

Do the following modification to exercises 1 & 2(not included in Textbook Program 7-2):
Ask the user the number of employees, n, and consider that the maximum number of employees that could work in this company is 30. Validate so that the number of employees, n, can only get a value between 1 and 30(maximum).
Adjust your code so that it prints the hours worked per employee and the average working hours considering the n employees.
The program output must look as presented in exercises 1 & 2, but for n employees instead of specifically six.
***Recall that we are using static arrays in this course. The array dimension is 30, but only n cells of the array will be used.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!