I am suppose to..

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

weight of package in kg rates per 500 miles shipped

2 kg or less $1.10

over 2kg but not more than 6kg $2.20

over 6kg but not more than 10 kg $3.70

over 10kg but not more than 20 kg $4.80

so far i have this...and when i compiled it it is all wrong..

#include<iostream> #include<iomanip> using namespace std; int main() { float weight, distance, rate; cout << "Enter the weight of the package."; cin >> weight; cout << "Enter the distance to be shipped."; cin >> distance; if ( weight <= 2kg ) rate = $1.10; if ( weight > 2kg && weight < 6kg ) rate = $2.20; if ( weight > 6kg && weight < 10kg ) rate = $3.70; if ( weight > 10kg && weight < 20 kg ) rate = $4.80;

** Edit **