📅  最后修改于: 2022-03-11 14:44:44.908000             🧑  作者: Mango
program number_to_alphabet_score;
var
score : Integer;
alphabet_score : string;
function convert_ke_huruf(score : Integer) : string;
begin
if (score >=80) and (score <=100) then
alphabet_score := 'A'
else if (score >=77) and (score <80) then
alphabet_score := 'A-'
else if (score >=75) and (score <77) then
alphabet_score := 'B+'
else if (score >=70) and (score <75) then
alphabet_score := 'B'
else if (score >=66) and (score <70) then
alphabet_score := 'B-'
else if (score >=61) and (score <66) then
alphabet_score := 'C+'
else if (score >=55) and (score <61) then
alphabet_score := 'C'
else if (score >=50) and (score <55) then
alphabet_score := 'D+'
else if (score >=40) and (score <50) then
alphabet_score := 'D'
else if (score >0) and (score <40) then
alphabet_score := 'E'
end;
begin
Write('Your score : ');ReadLn(score);
convert_ke_huruf(score);
WriteLn('Your score is ', alphabet_score)
end.