Thursday
April 24, 2014

Homework Help: Computer Science

Posted by Legendirty on Friday, May 10, 2013 at 5:11pm.

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.”

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

probability - out of 250 students interviewed at a community college, 90 were ...
English - 1. What does she look like? She looks sad. 2. What is she like? She ...
English - What does she look like? 1. She looks like a movie star. 2. She is ...
biology - Can someone please describe what a double helix looks like? I think it...
computers - I was wondering if someone could please help me thanks so much. My ...
English - Let's write down what you can do with the computer. 1. I use the ...
computer - What does tenure track, part time instructor of computer science does...
Algebra - Describe what the graph of interval [-4,10] looks like. I am trying to...
English - Posted by rfvv on Friday, July 2, 2010 at 1:00am. 1. What does she ...
Technology in the Classroom - A software package that you would like to run on ...

Search
Members