Advertisement
thunt1894

Untitled

Sep 30th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. // Declare real weight_of_package
  2. // Declare real shipping_charges
  3.  
  4. // Declare constant RATE_PER_POUND
  5.  
  6. // Get the weight of a package in pounds
  7. Display β€œWhat is the weight of your package?”
  8. Input weight_of_package
  9.  
  10. // Determine the price per pound
  11. If weight_of_package<=2
  12. PRICE_PER_POUND=1.1
  13. Else
  14. If weight_of_package<=6
  15. PRICE_PER_POUND=2.2
  16. Else
  17. If weight_of_package<=10
  18. PRICE_PER_POUND=3.7
  19. Else
  20. PRICE_PER_POUND=3.8
  21. End if
  22. End if
  23. End if
  24.  
  25. //Calculate the shipping charges
  26. shipping_charges = weight_of_package * PRICE_PER_POUND
  27.  
  28. //Display the shipping charges
  29. Display β€œThe shipping charges are $”, shipping_charges
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement