A Ferry Shipping Company charges the following rates
Weight of Package (in Kilograms) Rate per 1000 Miles shipped
2 Kg or less Rs 2.25
Over 2 Kg but not more than 6 Kg Rs 4.25
Over 6 Kg but not more than 10 Kg Rs 5.00
Over 10 Kg but not more than 50 Kg Rs 6.10
Write a program that asks for the weight of the package and the distance it is to be shipped, and
then displays the weight of the package, distance and charges.
Input validation:
Do not accept values of 0 or less for the weight of the package.
Do not accept weights of more than 50 Kg (this is the maximum weight the company will
ship).
Do not accept distances of less than 10 miles or more than 1,000 miles. These are the
company’s minimum and maximum shipping distances.
Answers
Answered by
0
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Similar questions