Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This pseudocode will accept the score of 15 students and output who passed, who failed and who
had the highest and lowest grades.
BEGIN
Passed = 0
Failed = 0
BEGIN
Read studname[count]
End
If (Lscore>studscore[count]) THEN
Lscore=studscore[count]
Lname=studname[count]
ENDIF
If (Hscore<studscore[count]) THEN
Hscore=studscore[count]
Hname=studname[count]
ENDIF
ENDFOR
For (count=1 to 15) Do
IF (studscore[count]>=passmark) THEN
Passed = Passed + 1
Else
Failed = Failed + 1
ENDIF
ENDFOR
PRINT “The person with the highest grade is”, Hname, “with a grade of”, Hscore
PRINT “The person with the highest grade is”, Lname, “with a grade of”, Lscore
PRINT “The number of students that passed are”, passed, “and the number of students that failed
are”, failed
End