REM Program: Report.bas REM Written By: Rob. Breuer REM Date Written: 15th May 1996 REM Last modified: 15th May 1996 REM Description: This program creates a report of student marks. A final REM mark and letter grade for each student is printed to the REM screen followed by a summary of each letter grade. REM REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CLS OPEN "C:\temp\marks.txt" FOR INPUT AS #1 LET HighDistinction = 0 LET Distinction = 0 LET Credit = 0 LET Pass = 0 LET Fail = 0 LET Line$ = STRING$(50, CHR$(196)) COLOR 4 PRINT TAB(15); "Student Marks Summary Report" PRINT PRINT Line$ PRINT COLOR 9 DO WHILE NOT EOF(1) INPUT #1, Name$, Assign1, Assign2, Exam LET Mark = Assign1 + Assign2 + Exam IF Mark >= 85 THEN LET LetterGrade$ = "High Distinction" HighDistinction = HighDistinction + 1 ELSE IF Mark >= 75 THEN LET LetterGrade$ = "Distinction" Distinction = Distinction + 1 ELSE IF Mark >= 65 THEN LET LetterGrade$ = "Credit" Credit = Credit + 1 ELSE IF Mark >= 50 THEN LET LetterGrade$ = "Pass" Pass = Pass + 1 ELSE LET LetterGrade$ = "Fail" Fail = Fail + 1 END IF END IF END IF END IF PRINT Name$, Mark, LetterGrade$ LOOP COLOR 4 PRINT PRINT Line$ PRINT PRINT "The Number of High Distinctions is: "; HighDistinction PRINT "The Number of Distinctions is: "; Distinction PRINT "The Number of Credits is: "; Credit PRINT "The Number of Passes is: "; Pass PRINT "The Number of Fails is: "; Fail CLOSE #1 END