4 Algorithms and flowcharts (3)

Resources | Revision Questions | Information Technology IT

Login to see all questions

Click on a question to view the answer

1.

Consider a list of student scores. Write an algorithm to determine the average score and identify any students who scored above the average. Assume the list of scores is stored in an array called scores.

2.

Consider a simple program to calculate the area of a rectangle. Represent the algorithm using a flowchart. Include input, processing, and output steps. Clearly indicate the data types involved.

3.

Write pseudo-code to determine if a given number is a prime number. The user will input a number. You must use a FOR loop and the concept of divisibility. A prime number is a number greater than 1 that has no positive divisors other than 1 and itself.