The content is just an excerpt from the complete note for SS2 Third Term Computer Studies Lesson Note – Algorithms and Flow Chart II. Check below to download the complete DOCUMENT
WEEK: 5
TOPIC: ALGORITHMS AND FLOW CHART (II)
CONTENT: (a) Writing algorithm (b) Flowchart symbols (c) Use of Flowchart (d) Flowchart diagrams for solving a given program
Sub-Topic 1: Writing Algorithm
Example 1: Compute the average of a given set of numbers, N
Solution:
- Input “count the numbers in the set”: N
- C =1// use to count the numbers processed
- Sum=0
- If c>N :go to line 9
- Input next number; num
- Sum=sum + num
- C=c + 1
- Go to line 4
- Average= sum/Nn
- Write the value of average
- Stop
Example 2: Evaluate the equation y=a (b-c)2/d+2
Solution:
- Input values for a, b, c, d
- Y=a*(b-c)^2/(d+2)
- Write the value of y
To gain full access to the note: DOWNLOAD FILE