Basic Pseudocode Practice 1
Basic Pseudocode Practice 1
4. Design a program that asks a user to INPUT two numbers. The program will multiply the
numbers together (hint: you need to create a variable that stores the product). If the
product is larger than 100 it outputs the message “Greater than 100”. If not, it does nothing.
1
Pseudocode Practice
(Do not use CASE OF, use IF ... ELSE ... THEN instead)
You are asked to design a program that can automatically calculate the cost of the
purchase. Print out the cost. The program will keep repeating until a user INPUT a
value "stop". Write the pseudocode for this program.
IF NumberOfFries > 10
THEN
IF NumberOfFries > 20
THEN
Discount <- 0.15
ELSE
Discount <- 0.05
ENDIF
ELSE
Discount <- 0
ENDIF
INPUT Continue
2
Pseudocode Practice
1. Totaling
StudentMark [1:10]
70 75 80 60 70 65 75 90 95 100
2. Counting
StudentMark [1:10]
70 75 80 60 70 65 75 90 95 100
Write the pseudocode to find the number of students who pass (mark > 50) the exam.
3
Pseudocode Practice