Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It's a C++ Programming use Dev C++. Please make it clear. Thank you. 4. Rapid Delivery charges by weight for delivery of packages. The delivery
It's a C++ Programming use Dev C++. Please make it clear.
Thank you.
4. Rapid Delivery charges by weight for delivery of packages. The delivery charge for the first pound (16 ounces) is $3.00 and $0.50 is added onto the charge for each additional four ounces. For example, a package weighing more than 16 but at most 20 ounces costs $3.50 to deliver; a package weighing more than 20 but at most 24 ounces costs $4.00 to deliver, ecc. write a program that inputs the weight of a package in ounces (an integer value), then outputs the weight and the charge for delivery. Your program needs to make use of these functions in addition to the program driver function main): get_weight - an int-valued data input function that will prompt for, read in, and return the package weight in ounces delivery charge - a float-valued function that will accept the package weight in ounces via a parameter and will calculate and return the delivery charge display_charge - avoid function that will accept the package weight in ounces and the delivery charge via parameters and will display the weight, in pounds and ounces, and the delivery charge with a dollar sign and two places of accuracy. Hint: If the weight of a package in ounces, w, is over 16 ounces, then the number of additional weight charges equals [(w-13)/4), where "/" means C++ integer division. Here is an example of what output should look like from running your program (user input is shown in bold): Enter package weight (oz): 23 Package weight = 1 lb. 7 oz. Delivery charge = $4.00Step 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