165k views
3 votes
Write the algorithm of finding the average of five numbers

User Gooey
by
6.1k points

1 Answer

7 votes

Answer:

The algorithm is as follows:

1. Start

2. Declare num1, num2, num3, num4, num5

3. Declare Sum, Average

4. Input num1, num2, num3, num4, num5

5. Sum = num1+num2+num3+num4+ num5

6. Average = Sum/5

7. Display Average

8. Stop

Step-by-step explanation:

This signals the beginning of the algorithm

1. Start

Declare all variables

2. Declare num1, num2, num3, num4, num5

3. Declare Sum, Average

Input all 5 numbers

4. Input num1, num2, num3, num4, num5

Calculate their sum

5. Sum = num1+num2+num3+num4+ num5

Calculate their average

6. Average = Sum/5

Print the calculated average

7. Display Average

This signals the end of the algorithm

8. Stop

User Blafasel
by
6.0k points