Question
Assume that the post office has the following flat pricing for shipping packages based on their weight (maximum package weight is limited to 40 pounds):
Assume that the post office has the following flat pricing for shipping packages based on their weight (maximum package weight is limited to 40 pounds): WEIGHT PRICE up 2 lbs. $5.00 from 3 12 lbs. $8.50 from 13 20 lbs. $12.50 from 21 40 lbs. $18.00 Write a C++ program that will input a series of package weights (one package weight per line) from the user and outputs the total number of packages in each weight category, and the total cost of all the packages to be shipped. Assume that the user has to input a 0 (zero) to complete the data entry. No source code comments are required. For example, if the user enters the following data: 2, 35, 12, 1, 17, 4, 0; the output should be as follows: 2 packages under 2 lbs. 2 packages between 3 12 lbs. 1 package between 13 20 lbs. 1 package between 21 40 lbs. The total shipping price is $57.50
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started