How to work this programming problem-
Write a program that allows the user to input a total dollar amount for an online shopping order and computers and outputs the shipping cost based on the following schedule
Order total Ship within USA Ship to Canada
Less than $ 50.00 $6.00 $ 8.00
$ 50.01- $ 100.00 $ 9.00 $ 12.00
$ 100.01- $150.00 $ 12.00 $ 15.00
Over $ 150.00 Free Free
programming - MathMate, Thursday, February 16, 2012 at 8:07am
Basically programming is to express what you would do in a programming language.
This is what I would do if I did it by hand:
1. Tell me how much the order total
2. Determine the destination
3. Locate from the table the shipping cost (for US)
over 150 free
Since $88 is within the 50.01 to 100 bracket, the shipping cost (to US) is $9.
4. Print "Shipping cost to US is $9 for an order of $88"
What I just wrote is called a pseudocode.
You will need to adapt this to the programming language of your choice.