The cost of sending a package by an express delivery service is S12.00 for the f
ID: 1940486 • Letter: T
Question
The cost of sending a package by an express delivery service is S12.00 for the first two pounds, and $4.50 for each pound or fraction thereof over two pounds. If the package weighs more than 70 pounds, a S15.00 excess weight surcharge is added to the cost. No package over 100 pounds will be accepted. Write a program that accepts the weight of a package in pounds and computes the cost of mailing the package. Be sure to handle the case of overweight packages.Explanation / Answer
function [Cost] = Packaging(NX) Cost = 0; if (NX2 && NX=71 && NX > Packaging(1) ans = 12 >> Packaging(2) ans = 12 >> Packaging(3) ans = 16.5000 >> Packaging(50) ans = 228 >> Packaging(70) ans = 318 >> Packaging(75) ans = 355.5000 >> Packaging(100) ans = 468 >> Packaging(101) Package weighs over 100 lbs. Package cannot be shippedRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.