programming

posted by .

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 -

    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
    (example: $88)
    2. Determine the destination
    (example US)
    3. Locate from the table the shipping cost (for US)
    0-50 $6
    50.01-100 $9
    100.01-150 $12
    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.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computer programming

    Sorting is a common operation used in programming. Although languages such as Visual Basic 2008 offer built-in methods for sorting, other languages such as C do not support such a method. In order to be a programmer you should be able …
  2. Programming

    Create a program that determine the shipping cost for an order based on the following table: From $0.00 $20.00 $50.00 $75.00 To $19.99 $49.99 $79.99 $1000.00 Price $2.95 $3.95 $4.95 Free
  3. Computer Science

    Would like to know if this looks right Write a program that allows the user to input a total dollar amount for an online shopping order and computes and outputs the shipping cost based on the following schedule: Order Total Ship within …
  4. programming concepts

    Write a program that allows the user to input a total dollar amount for an online shopping order and computes and outputs the shipping cost based on the following schedule: Order Total Ship within USA Ship to Canada Less than $50.00 …
  5. programming concepts

    Write a program that allows the user to input a total dollar amount for an online shopping order and computes and outputs the shipping cost based on the following schedule: Order Total Ship within USA Ship to Canada Less than $50.00 …
  6. programming

    Write a program which allows user to enter 10 student names and scores for Java programming 1 and Java programming 2. Allow user to choose which course they want to enter the record for. Use the loop to ask input from user. The program …
  7. progamming concepts

    Write a program that allows the user to input a total dollar amount for an online shopping order and computes and outputs the shipping cost based on the following schedule: Order Total Ship within USA Ship to Canada Less than $50.00 …
  8. computers - Programming

    Create a program that uses two parallel one-dimensional arrays. The program displays a shipping charge that is based on the number of items ordered by a customer. The shipping charge scale is shown in Figure 1 below. Store the maximum …
  9. programming

    A. Write a program which reads an array of up to 200 integers from input and then does all the following in order 1. searches the array for a specific integer given by the user and outputs its position in the array; 2. outputs the …
  10. programming

    A store uses the following policy to award discount. If the customer purchases products costing more than ksh 30,000 she is given a discount of 10%, otherwise she is given a discount of 2%. Write a complete C++ program that allows …

More Similar Questions