CSC301 Practicals Examples
CSC301 Practicals Examples
begin {½mrk}
write ('What is your score? '); {½mrk}
readln(score); {½mrk}
if (score<45) then grade:='F' {½mrk}
else if ((score>=45) and (score<50)) then grade:='D' {½mrk}
else if ((score>=50) and (score<60)) then grade:='C' {½mrk}
else if ((score>=60) and (score<70)) then grade:='B' {½mrk}
else if ((score>=70) and (score<=100)) then grade:='A’ {½mrk}
else grade:='out of range!'; {½mrk} {Use of Conditional statements = 3mrk}
writeln('Your score value is ', score, ' and your grade is ', grade); {1mrk}
readln;
end. {½mrk}