You are on page 1of 1

ALGORITHM QUESTIONS

1. Create an IPO table for the following problem


Natasha wants to calculate her term average for the 12 subjects she is currently studying.

INPUT PROCESS OUTPUT


Describe Variables used for input Add all numbers together and divide The answer shown
Grades (marks from the different by 12
classes)

2. Create an IPO table and a pseudocode algorithm to solve the following problem.

Bob's Discount Bolts charges the following prices:

 5 cents per bolt


 3 cents per nut
 1 cent per washer

Design an algorithm, that asks the user for the number of bolts, nuts, and washers in their
purchase and then calculates and prints out the total.

Input Process Output


5 cents per bolt Ask for the number of nuts bolts and washers Print answers
3 cents per nut Multiply 5 by amount purchased
1 cent per washer Multiply 3 by amount purchased
Multiply 1 by amount purchased
add total of each

VARIABLES USED
Nuts
Bolts
Washers
Total
START
INPUT Total Bolts + Nuts + Washers
OUTPUT "How many Bolts were purchased today?"
INPUT 0.05*Bolts
OUTPUT "How many Nuts were purchased today?"
INPUT 0.03*Nuts
OUTPUT "How many Washers were purchased today?"
INPUT 0.01*Washers
OUTPUT Total
FINISH

You might also like