1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Agata [3.3K]
3 years ago
10

The cost of sending a package by an express delivery service is $15 for the first two pounds and $5 for each pound or fraction t

hereof over two pounds. If the package weighs more than 70 pounds, a $15 excess weight surcharge is added to the cost. No package over 100 pounds will be accepted. Write a program that accept the weight of a package in pounds and computes the cost of mailing the package. Be sure to handle the case of overweight package.
Computers and Technology
1 answer:
Sloan [31]3 years ago
8 0

Answer:

Check the explanation

Explanation:

The MATLAB program should follow the following condition:

  1. • $15.00 for first two pounds and $5.00 for each over two pounds.
  2. • If package is more than 70 pounds, extra $15.00 is added to the total cost.
  3. • The package more than 100 pounds are not accepted.

Type the following MATLAB code to calculate the cost of mailing the package with th given conditions.

<em>% input the weight of the package </em>

<em>W=input('enter the weight of the package in pounds: \n'); </em>

<em>% initialize the cost, and surcharge for excess weight </em>

<em>cost=15; </em>

<em>surcharge15; </em>

<em>% weights more than 100 pounds are not accepted if >100 </em>

<em>disp('Sorry, no package over 100 pounds is accepted.); </em>

<em>else </em>

<em>% calculate the cost for the weights up to 100 pounds </em>

<em>if W>2 </em>

<em>% cost is $5 for each extra pound </em>

<em>Cost=cost+(W-2)* 5; </em>

<em>End </em>

<em>if W>70 </em>

<em>% extra charge is considered for weights more than 70 pounds </em>

<em>cost = cost+surcharge; </em>

<em>end </em>

<em>fprintf('The total cost for sending %3.2f pounds weight is %5.2f dollars \n', W, cost) </em>

<em>end </em>

<em />

Execute the code at the MATLAB command window for different weigh of the packages

<em>Enter the weight of the package in pounds: </em>

<em>2</em>

<em>The total cost for sending 2.00 pounds weight is 15.00 dollars </em>

<em>Enter the weight of the package in pounds. </em>

<em>3.5 </em>

<em>The total cost for sending 3.50 pounds weight is 22.50 dollars </em>

<em>Enter the weight of the package in pounds: </em>

<em>72 </em>

<em>The total cost for sending 72.00 pounds weight is 380.00 dollars </em>

<em>Enter the weight of the package in pounds: </em>

<em>101 </em>

<em>Sorry, no package over 100 pounds is accepted </em>

Thus, the MATLAB code is written and executed.

You might be interested in
Patient letters created from __________ use structured data and do not require a large amount of typing from the medical assista
umka2103 [35]
Templates I think. not sure
3 0
3 years ago
Normal or random variations that are considered part of operating the system at its current capability are ______: ​ a. systemic
Effectus [21]

Normal or random variations that are considered part of operating the system at its current capability are <u> c. common cause variations.</u>

Explanation:

Common cause variation is fluctuation caused by unknown factors resulting in a steady but random distribution of output around the average of the data.

Common-cause variation is the natural or expected variation in a process.

Common-cause variation is characterised by:

  1. Phenomena constantly active within the system
  2. Variation predictable probabilistically
  3. Irregular variation within a historical experience base

It is a measure of the process potential, or how well the process can perform when special cause variation removed.

Common cause variation arises from external sources that are not inherent in the process and is where statistical quality control methods are most useful.

Statistical process control charts are used when trying to monitor and control 5- and 6-sigma quality levels.

4 0
4 years ago
Did the Z3 computer invented by Konrad Zuse have a negative effect on society?
musickatia [10]

Answer:

Explanation:

Không

4 0
3 years ago
Read 2 more answers
How to Ctrl + shift + F4 but in a HP laptop?​
ludmilkaskok [199]

Answer:

Hit the X Button Located on the top right corner or hit Control, Alt, Delete

Explanation:

Hitting the X button will make you exit the whole cite, or hitting Control, Alt, Delet, will make you go to the task bar, in which you can go to the bottom right of that screen and it should say end task

3 0
3 years ago
Read 2 more answers
Security is a major concern with m-commerce. How can m-commerce software ensure the security of transmissions and that the trans
dimaraw [331]

Answer:

Security in communication between applications and sites in m-commerce can use SSL technology.

Explanation:

While developing an app, developers have to perform several checks and ensure that the server has a legitimate certificate.

7 0
2 years ago
Other questions:
  • When the tcp\ip translates a network layer address into a data link layer address (after not finding an entry for the network la
    13·1 answer
  • What is called photo and video edition?
    8·1 answer
  • Fill the validateForm function to check that the phone number contains a number (use the isNaN function) and that the user name
    10·1 answer
  • What internet service provider first dominated the internet in the 1990s?
    15·1 answer
  • Among the following, which is the best protection against ransomware?
    8·1 answer
  • python (Business: check ISBN-10) An ISBN-10 (International Standard Book Number) consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. T
    12·1 answer
  • The administrators of Tiny College are so pleased with your design and implementation of their student registra- tion and tracki
    13·1 answer
  • Class C Airspace inner ring begins at the __________ and extends vertically (by definition) to MSL charted values that generally
    5·1 answer
  • Question #2: How would you demonstrate professionalism in a video call with a teacher? Edmentum Digital world Please Help!!
    8·1 answer
  • Which of the following is NOT a best practice to protect data on your mobile computing device?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!