0% found this document useful (0 votes)
15 views2 pages

FPA Matric Number Grade Program

The document contains a program written in Pascal that takes a student's test score as input and outputs their letter grade. It includes the student's name, student ID, and course information. The program uses if/else statements to check the score and output the corresponding grade from AA to F2, or indicates an invalid score.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

FPA Matric Number Grade Program

The document contains a program written in Pascal that takes a student's test score as input and outputs their letter grade. It includes the student's name, student ID, and course information. The program uses if/else statements to check the score and output the corresponding grade from AA to F2, or indicates an invalid score.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

NAME: AYENI MOSES ADEBIYI

MATRIC NO: FPA/CS/15/3-0029


COURSE: OO PASCAL

program GRADE;

{$mode objfpc}{$H+}

uses

{$IFDEF UNIX}{$IFDEF UseCThreads}

cthreads,

{$ENDIF}{$ENDIF}

Classes

{ you can add units after this };

var

score:integer;

begin

{programme to display student's grade}

writeln('Enter to your score');

readln(score);

if (score >= 75) and (score <= 100) then

writeln('Your grade is AA 4.0')


NAME: AYENI MOSES ADEBIYI
MATRIC NO: FPA/CS/15/3-0029
COURSE: OO PASCAL

else if (score >= 70) and (score <= 74) then

writeln('Your grade is A 3.5')

else if (score >= 65) and (score <= 69) then

writeln('Your grade is BB 3.25')

else if (score >= 60) and (score <= 64) then

writeln('Your grade is B 3.0')

else if (score >= 55) and (score <= 59) then

writeln('Your grade is CC 2.75')

else if (score >= 50) and (score <= 54) then

writeln('Your grade is C 2.50')

else if (score >= 45) and (score <= 49) then

writeln('Your grade is DD 2.25')

else if (score >= 40) and (score <= 44) then

writeln('Your grade is D 2.0')

else if (score >= 30) and (score <= 39) then

writeln('Your grade is F1 1.5')

else if (score >= 20) and (score <= 29) then

writeln('Your grade is F2 1.0')

else if (score >= 0) and (score <= 19) then

writeln('Your grade is A 0.00')

else

writeln('wrong score');

writeln('press enter key to exit');

readln();

end.

You might also like