Answer:
Algorithm to calculate the average of numbers is
- Start
- sum = 0, i = 1, average, count = 0
- if i / 2 == 0 then go to step 4, else go to on step 5
- sum = sum + i, count = count + 1
- i = i + 1
-
if i <= 50 then go to on step 3, else go to on step 7
-
Display “sum”
-
average = sum/count
-
Display “average”
-
Stop
Explanation:
Algorithm to calculate the average of numbers is
- Start
- sum = 0, i = 1, average, count = 0
- if i / 2 == 0 then go to step 4, else go to on step 5
- sum = sum + i, count = count + 1
- i = i + 1
-
if i <= 50 then go to on step 3, else go to on step 7
-
Display “sum”
-
average = sum/count
-
Display “average”
-
Stop