Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Declare real weight_of_package
- // Declare real shipping_charges
- // Declare constant RATE_PER_POUND
- // Get the weight of a package in pounds
- Display βWhat is the weight of your package?β
- Input weight_of_package
- // Determine the price per pound
- If weight_of_package<=2
- PRICE_PER_POUND=1.1
- Else
- If weight_of_package<=6
- PRICE_PER_POUND=2.2
- Else
- If weight_of_package<=10
- PRICE_PER_POUND=3.7
- Else
- PRICE_PER_POUND=3.8
- End if
- End if
- End if
- //Calculate the shipping charges
- shipping_charges = weight_of_package * PRICE_PER_POUND
- //Display the shipping charges
- Display βThe shipping charges are $β, shipping_charges
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement