Algorithm
Algorithm
SET attempts = 0
IF password == courseCode
BREAK
ELSE
INCREMENT attempts by 1
IF attempts == 3
EXIT
DO
DISPLAY "Menu: 1. Enter Marks and Calculate GPA (Max GPA = 5), 2. Calculate Age, 3. Exit"
INPUT choice
SWITCH(choice)
CASE 1:
SET totalMarks = 0
DO
BREAK
CASE 2:
BREAK
CASE 3:
EXIT
DEFAULT:
WHILE choice != 3
END