SLeigh1213
March 14th, 2009, 10:55 PM
Can anyone help me? I have homework due tomorrow and I am stuck on #1. Here is my issue: Rewrite the following pseudocode so that the user input and calcuations are each in a spearate module. Include a comment at the beginning of each module that describes the purpose of that module. A line containing a comment should bening with a single quote ('). You should have a data entry module, a calculation module, and an output module.
start
num quantityOrdered
num itemPrice
print "Enter an Order Quantity"
read quantityOrdered
print "Enter the Items Price"
read itemPrice
if quantityOrdered > 100 then
discount =.20
else
if quantityOrdered > 12 then
discount =.10
else
discount = 0
endif
endif
total = price * quantityOrdered
total = total - discount * total
print total
stop
All help ASAP would be greatly appreciated.
start
num quantityOrdered
num itemPrice
print "Enter an Order Quantity"
read quantityOrdered
print "Enter the Items Price"
read itemPrice
if quantityOrdered > 100 then
discount =.20
else
if quantityOrdered > 12 then
discount =.10
else
discount = 0
endif
endif
total = price * quantityOrdered
total = total - discount * total
print total
stop
All help ASAP would be greatly appreciated.