1program number_to_alphabet_score;
2
3var
4 score : Integer;
5 alphabet_score : string;
6
7function convert_ke_huruf(score : Integer) : string;
8begin
9 if (score >=80) and (score <=100) then
10 alphabet_score := 'A'
11 else if (score >=77) and (score <80) then
12 alphabet_score := 'A-'
13 else if (score >=75) and (score <77) then
14 alphabet_score := 'B+'
15 else if (score >=70) and (score <75) then
16 alphabet_score := 'B'
17 else if (score >=66) and (score <70) then
18 alphabet_score := 'B-'
19 else if (score >=61) and (score <66) then
20 alphabet_score := 'C+'
21 else if (score >=55) and (score <61) then
22 alphabet_score := 'C'
23 else if (score >=50) and (score <55) then
24 alphabet_score := 'D+'
25 else if (score >=40) and (score <50) then
26 alphabet_score := 'D'
27 else if (score >0) and (score <40) then
28 alphabet_score := 'E'
29end;
30
31begin
32 Write('Your score : ');ReadLn(score);
33 convert_ke_huruf(score);
34 WriteLn('Your score is ', alphabet_score)
35end.