Uploaded by ike kells

check

advertisement
SECTION A: DRY RUN
10 marks
Start
Let N=0
Let Sum=0
N=N+1
Sum=Sum+N
No
Is N=10?
Yes
Display Sum
Stop
Use the flowchart above to determining the values of N and SUM when you “dry run” the
flowchart above. Write the values of N and SUM in the space provided below
ITERATION
Iteration 1
Iteration 2
Iteration 3
Iteration 4
Iteration 5
Iteration 6
Iteration 7
Iteration 8
Iteration 9
N
0
SUM
0
Iteration 10
SECTION B:
ANSWER All QUESTIONS
50 MARKS
1. Write an algorithm to accept two numbers, divide the first number by the second
number and display their quotient
2. Write and algorithm that accepts five numbers and displays the sum and average of
the numbers
3. Draw a flowchart to accept the radius and calculate the area of a circle.
4. Write the pseudocode to accept item name, price and quantity from a user and display
the item name and its total value. The total value can be calculated as the product of
price and quantity.
5. Write the pseudocode to accept the age of a candidate. If the age entered is 18 or
above the message „You are eligible to vote’ should displayed. If the age entered is
below 18, the message „You are not eligible to vote „should be displayed.
Download