Question: Must Be Written In C using arrays Create a program that stores the information of up to 50 containers loaded on ship. The program should

Must Be Written In C using arrays

Create a program that stores the information of up to 50 containers loaded on ship. The program should contain a menu to do the following:

A or a to add a container.

R or r to retrieve the information of one container.

T or t to retrieve the information of all containers.

W or w to retrieve the total weight of the loaded containers.

X or x to exit the program

Ask the user for the number of containers to be loaded, create an array of floats with five rows and a number of columns equal to the number of containers provided by the user.

Option A: for this option check if the array has an empty column to enter the information for a container, if not, output a message indicating that array is full. If array is not full, ask the user for the ID number, length in meters, width in meter, height in meters, and weight in Kg of the container and store them in the array.

Option R: Ask the user for the desired ID number to be searched. If found, output the ID number, length in meters, width in meter, height in meters, weight in Kg, and volume in cubic meters of the container each on a line. If not found, display a message to that effect.

Option T: retrieve the info for all containers in the array with a dotted line separating one another. The info retrieved and calculated should be the same as the above step.

Option W: display the total weight of all the containers in the array.

Option X: Exit the program.

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!