This preview shows pages 1–2. Sign up to view the full content.
Each of the following problems can be solved by a program that performs three basic tasks
—Input Data, Process Data, and Output Results. For each problem, use pseudocode to
design a suitable program for solving it.
1.
Input a saleswoman’s sales for the month (in dollars) and her commission rate (as a
percentage), and output her commission for that month.
Input Data
Input Sales for Month, CommissionRate
Process Data
Compute Sales for Month
Compute CommissionRate
Compute TotalCommission
Output Results
Output the input data and TotalCommission
2.
The manager of the Super Supermarket would like to be able to compute the
unit price
for
products sold there. To do this, the program should input the name and price of an item and its
weight in pounds and ounces. It should then determine and display the unit price (the price per
ounce) of the item.
Input Data
Input ItemName, UnitPrice, UnitWeight
Process Data
Compute UnitPrice
Compute UnitWeight
Output Results
Output the input data and TotalPrice
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '10
 JOSEPHPILLERA
 Algorithms

Click to edit the document details