Question: This is in C, not C++. Write a program that computes the total weight of a cargo. The user will enter the number of boxes
This is in C, not C++.

Write a program that computes the total weight of a cargo. The user will enter the number of boxes and the weight of a box for each type of boxes they have. In the output below, the total weight is: (4 times 2) + (3 times 1) + (10 times 2) = 31. When the user has entered all the input, the user will give -1 for the number of boxes. Enter number of boxes: 4 Enter box weight (lbs): 2 Enter number of boxes: 3 Enter box weight (lbs): 1 Enter number of boxes: 10 Enter box weight (lbs): 2 Enter number of boxes: -1 The total weight is 31 lbs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
