Question: MATLAB. Please use while statement to answer all or any of these 27. Write a program in a script file that calculates the cost of
27. Write a program in a script file that calculates the cost of shipping a package according to the following price schedule: Weight Type of 0-05b 05-5 lb More than 5 lb service Ground S0.70+ S1.18+ $0.42 for every $4.96+$0.72 for every (s-7 days) $0.06/loz additional 0.5 Ib (or fraction). additional Ib (or fiac- tion). Express $2.40+ SA.40+ $1.20 for every $15.20+ $1.80 for every (3-4 days) $0.25/oz additional 0.5 lb (or additional Ib (or frac- fraction). tion). Overnight $12.20+ S18.60+ $4.80 for every $61.80+ $6.40 for every (One day) $0.80/az additional 0.5 lb (or additional lb (or frac- fraction) tion). The program asks the user to enter the type of service (Ground, Express, or Overnight) and the weight of the package (two numbers. First for number of pounds and second for number of ounces.) The program then displays the cost for the shipment. Run the program three times for the following cases: (a) Ground 2 lb 7 oz. (b) Express 0 Ib 7oz. (c) Overnight 5 Ib 10 oz
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
