Computer Science, asked by gururajaheri7311, 7 months ago

Using algorithms find The average of (6) subjects.

Answers

Answered by sheliadhikary00633
0

Explanation

Algorithm : →

Step 1 : Start

Step 2 : sum = 0, i = 1, average, count = 0

Step 3 : if i / 2 == 0 then go to step 4, else go to on step 5

Step 4 : sum = sum + i, count = count + 1

Step 5 : i = i + 1

Step 6 : if i <= 50 then go to on step 3, else go to on step 7

Step 7 : Display “sum”

Step 8 : average = sum/count

Step 9 : Display “average”

Step 10 : Stop

—————————————————————————————————————

Alternative : →

Step 1 : Start

Step 2 : sum = 0, i = 0, average, count = 0

Step 3 : i = i + 2

Step 4 : sum = sum + i, count = count + 1

Step 5 : if i <= 50 then go to on step 3, else go to on step 6

Step 6 : Display “sum”

Step 7 : average =sum/count

Step 8 : Display “average”

Step 9 : Stop

Hope it helped you

please mark my answer as brainliest

Similar questions