subject

A shipping company uses the following function to calculate the cost in dollars of shipping based on the weight of the package (in pounds): Weight Cost Greater than 0 but less than or equal to 1 pound $3.50 Greater than 1 but less than or equal to 3 pounds $5.50 Greater than 3 but less than or equal to 10 pounds $8.50 Greater than 10 but less than or equal to 20 pounds $10.50 Write a program that prompts the user to enter the weight of the package and displays the shipping cost. If the weight is negative or zero, display a message "Invalid input". If the weight is greater than 20 pounds, display a message "The package can not be shipped". Test your program with the following inputs: -10, 0, 0.5, 1, 7.25, 20, 21

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 05:20
Which operating system is a version of linux?
Answers: 1
You know the right answer?
A shipping company uses the following function to calculate the cost in dollars of shipping based on...
Questions
question
World Languages, 27.10.2020 21:50
question
Chemistry, 27.10.2020 21:50
question
Social Studies, 27.10.2020 21:50
question
Mathematics, 27.10.2020 21:50
Questions on the website: 13722363