Question: A two dimensional array ( m by n ) represents a mail box in an apartment building. Perform the following a . Accept the values

A two dimensional array (m by n) represents a mail box in an apartment building.
Perform the following
a. Accept the values n and m (n - number of floors and m - number of apartments on
each floor) from the user and define appropriate size array to hold the number of mail
items each resident has. Verify that floor number is between 5 and 12 and the number
of apartments on each floor is between 4 and 6.
b. Fill the array with random integer number in the range of 0 to 9.
c. Write a function where the inputs are: The above array, option and other inputs if
needed. The output of the function is the answer to the option and error code.
The options are:
a. Total number of mail items
b. Number of items for particular apartment
c. Which apartment has the maximum number of mail items
d. Which apartment has the minimum number of mail items
e. Number of mail items in a given floor
f. Which apartment has maximum mail items in a given floor.

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 Programming Questions!