Question
The Fast Freight Shipping Company charges the followingrates: Weight of Package(kilograms) Rateper 500 miles shipped 2 kg orless $1.10 Over 2 kg but not more than6kg $2.20 Over 6 kg but not more than 10kg $3.70 Over 10 kg but not more than 20kg $4.80 Write a program that asks for the weight of the package andthe distance it is to be shipped, and then displays thecharges. Input Validation: Do not accept values of 0 or less for theweight of the package. Do not accept weights of more than 20 kg. Donot accept distances of less than 10 miles or more than 3,000miles. My note: We have just learned of the if/else statements andthe default cout options...help! The Fast Freight Shipping Company charges the followingrates: Weight of Package(kilograms) Rateper 500 miles shipped 2 kg orless $1.10 Over 2 kg but not more than6kg $2.20 Over 6 kg but not more than 10kg $3.70 Over 10 kg but not more than 20kg $4.80 Write a program that asks for the weight of the package andthe distance it is to be shipped, and then displays thecharges. Input Validation: Do not accept values of 0 or less for theweight of the package. Do not accept weights of more than 20 kg. Donot accept distances of less than 10 miles or more than 3,000miles. My note: We have just learned of the if/else statements andthe default cout options...help!
Explanation / Answer
please rate - thanks #include #include using namespace std; int main() {double weight, rate,price,miles; coutweight; while(weight20) {cout6) rate=3.70; else if(weight>2) rate=2.20; else rate=1.10; price=rate*miles; cout