Create a program that stores the information of up to 50 containers loaded on ship. The...

80.2K

Verified Solution

Question

Electrical Engineering

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

A or a     to add a container.

R or r      to retrieve the informationof one container.

T or t      to retrieve the informationof all containers.

W or w   to retrieve the total weight of the loadedcontainers.

X or x      to exit the program

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

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

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 thecontainer each on a line. If not found, display a message to thateffect.

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

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

Option X: Exit the program.

Answer & Explanation Solved by verified expert
4.4 Ratings (673 Votes)
code include int main code int n    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students