You are on page 1of 1

Problem Statement 1: Design an algorithm and draw the flow chart to get three

subject marks from n students and find the sum and average of their individual
marks.

Algorithm
Step 1. Begin
Step 2. Get total number of students (n)
Step 3. Repeat until 1 to n
Step 3.1 Get mark1, mark2, mark3
Step 4. Repeat until 1 to n
Step 4.1 sum ← mark1+mark2+mark3
Step 4.2 average ← sum/3
Step 4.3 display sum, average
Step 5. End

Flowchart

Begin

Get total number of


students (n)

YES NO
Repeat until 1 to n

Get mark1, mark2, mark3

YES NO
Repeat until 1 to n

sum ← mark1+mark2+mark3
average ← sum/3

display sum, average

End

You might also like