Question: How to do this shipping charges in C++ language? Given the Weight of Package (in Kilograms), use the following Rate ($) per 500 Miles Shipped.

How to do this shipping charges in C++ language?

Given the Weight of Package (in Kilograms), use the following Rate ($) per 500 Miles Shipped.

2 kg or less = $1.10 per 500 Miles Shipped

Over 2 kg but not more than 6 kg = $2.20 per 500 Miles Shipped

Over 6 kg but not more than 10 kg = $3.70 per 500 Miles Shipped

Over 10 kg but not more than 20 kg = $4.80 per 500 Miles Shipped

Write a program that reads the weight of the package and the distance it is to be shipped, and then displays the charges.

Input Validation:

Do not accept values of 0 or less for the weight of the package.

Do not accept weights of more than 20 kg (this is the maximum weight the company will ship).

Do not accept distances of less than 10 miles or more than 3,000 miles. These are the companys minimum and maximum shipping distances.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!