You are on page 1of 4

ALGORITHM DESIGN

Design and testing


Algorithm practice
1. For a class of 10 students.
a. create an algorithm using pseudocode to ask students to enter their marks
(marks must be between 0 and 100 and the pass mark is 50) and then calculate
the total number of students, pass students and failed students.

The program should output:

• Number of pass students


• Number of failed students

8
b. Represent the same algorithm by a flow chart:

8
c. Use these data to test your program:
24, 35, -90, 90, 0, 100, 200, 87, 77, 23, 15, 45

Number of
Mark Pass Fail OUTPUT
students

You might also like