Selection Algorithm
Selection Algorithm
Selection Algorithm
The following are some conditions that can be tested using the
IF structure:
Problem 5
two numbers and
Wite an algorithm that requests a user to enter
Start
Complete the following task:
223
12 PROBLEM SOLVING AND ALGORITHM DEVELOPMENT (7
Problem 6
Calculate the total and average mark made by a student in five
Start
subjects. If the student made an average of 50 or more, output the
total mark, average mark and the message Pass'; else print the total
mark, average mark and the message 'Fail.
Possible algorithm
Prompt and The sumnmary for the steps to wTiting the possible algorithm is
INPUT A, B. C
D, E shown in Table 12.4.
END
224