Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

DAVE FERNAN R.

TIBURCIO CPEN21A 26 NOVEMBER 2022


202101460 BSCE 2-1

Write an algorithm and draw the flowchart to determine a student’s final grade and
indicate whether it is passing or failing. The final grade is calculated as the average of
four marks

PSEUDOCODE ALGORITHM
• Read 4 marks Step 1. Start
• Calculate their average by adding then Step 2. Read 4 marks (m1, m2, m3, m4)
dividing by 4 Step 3. Calculate average = (m1+m2+m3+m4)/4
• If average is below 70 Step 4. If average is below 70
Print “FAILED” Print “FAILED”
else else
Print “PASSED” Print “PASSED”
Step 5. Stop

FLOWCHART

Start

Read marks (m1, m2,


m3, m4)

Average = (m1+m2+m3+m4)/4

N
If average<70 Print “PASSED” 1

Y 1

Print “FAILED” Stop

You might also like