The Fast Freight Shipping Company charges the following rates:
Weight of Package (in Kilograms) Rate per 500 Miles shipped
2 KG or less: Rs 1.10
Over 2 Kg but not more than 6 Kg: Rs 2.20
Over 6 KG but not more than 10 Kg: Rs 3.70
Over 10 KG but not more than 20 KG: Rs 4.80
Write a program that asks for the weight of the package and the distance it is to be shipped, and then displays the charges.
Input validation:
1. Do not accept values of 0 or less for the weight of the package.
2. Do not accept weights of more than 20 Kg (this is the maximum weight the company will ship).
3. Do not accept distances of less than 10 miles or more than 3,000 miles.
Comments
Leave a comment