Computer Science, asked by samarpitatwinkle, 2 months ago

algorithm and flowchart of
Sum of first 50(odd) number

Answers

Answered by apurba2004vizag
5

Answer:

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 = 1, average, count = 0

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

Step 4 : i = i + 2

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

Explanation:

Similar questions