Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How will you select the teams members?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago