program ct;
uses crt;
var T,V:array[1..100] of real;
i,n:integer;
begin clrscr;
write('Nhap so hoc sinh: '); readln(n);
for i:=1 to n do
begin
write('Nhap diem toan cua hs thu ',i,': '); readln(T[i]);
write('Nhap diem van cua hs thu ',i,': '); readln(V[i]);
end;
for i:=1 to n do
begin
if T[i]+V[i]>=18 then writeln('Hs thu ',i,': Gioi');
if (T[i]+V[i]>=16) and (T[i]+V[i]<18) then writeln('Hs thu ',i,': Kha');
if (T[i]+V[i]>=12) and (T[i]+V[i]<16) then writeln('Hs thu ',i,': Trung binh');
if T[i]+V[i]<12 then writeln('Hs thu ',i,': Yeu');
end;
readln;
end.
Học tốt!