Question: Help me and explain each steps in this C++ coding question. Part 1: Find the Maximum and Minimum Weights You have weight data for several
Help me and explain each steps in this C++ coding question.
Part 1: Find the Maximum and Minimum Weights You have weight data for several items. Those weights are in pounds and ounces, which are both integer values, like table below. item weight item1 1lb 5oz item2 32oz item3 5lb 20oz Write a program that will read in the weight of an item in pounds and ounces one by one. Each time after user inputs a weight, the program asks user to input[Y/N] whether user wants to input more weight data. When user say 'N', the program prints the maximum and the minimum weights among the weight data. Divide this task into several subtasks. Some of subtasks may be divided into a few sub- subtask. State those in comment lines in your code. The program should not assume the number of weight data. o Include a loop that lets the user repeat new input values until the user wants to end the program. o When user wishes to end the program, the program outputs the maximum and minimum of weight data, and then ends. Even though user inputs ounces that is greater than or equal to 16, the program should convert it to pounds and ounces that is less than 16. o For example, 32oz is converted to 21b Ooz, Note 16 oz = 1 lb. Declare variables to express all constant values used in the code with the modifier const. And use those in your code. Use an appropriate data type for each variable declared in your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
