# Computer Science

posted by .

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 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
WRITE “Shipping Cost Calculator“
WRITE “This program will calculate the shipping cost of your order.”
DECLARE variable1
DECLARE variable2
DECLARE variable3
Set variable = 0.0
WRITE “How much did your order cost?”
INPUT variable
WRITE “Do you live in the USA (type U) or Canada (type C)?”
INPUT variable
If variable == “U” Then
If variable < 50.00
SET 6.00
Else
If variable < 100 Then
SET 9.00
Else
If variable <= 150 Then
SET 12.00
Else
SET 0.0
End If(150)
End If (100)
End If (50)
WRITE “Your shipping cost is \$ “ + variable
Else
If variable == “C” Then
If variable < 50 Then
SET 8.00
Else
If variable < 100 Then
SET 12.00
Else
If variable <= 150 Then
SET 15.00
Else
SET 0.0
End If(150)
End If (100)
End If (50)
WRITE “Your shipping cost is \$ “ + variable
Else
WRITE “Sorry, we cannot ship outside the US or Canada.”

• Computer Science -

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.00 \$8.00
\$50.01–\$100.00 \$9.00 \$12.00
\$100.01–\$150.00 \$12.00 \$15.00
Over \$150.00 Free Free

## Similar Questions

1. ### computer science

write a program that prompts the user to input three numbers. The program should then output the numbers in nondescending order.
2. ### programming

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 …
3. ### Computer Science (Programming Logic And Design)

How do i Create a program that determine the shipping cost for an order based on the following chart:  From To Price  \$0.00 \$19.00 \$2.95  \$20.00 \$49.99 \$3.95  \$50.00 \$74.99 \$4.95  \$75.00 \$1000.00 \$Free
4. ### Computer Science

Write a program   that reads the subtotal and the gratuity rate in this order, then computes the gratuity and total. For example, if the user enters "10" for subtotal and "15" (%) for gratuity rate, the program   displays "1.5" …
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 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 …
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. ### 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 …
9. ### 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 …
10. ### control structures

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