uses crt;
var a:array[1..100] of integer;n,i,gioi,kha,trungbinh,kem:integer;
begin
clrscr;
write('Nhap so luong hoc sinh: '); readln(n);
gioi:=0;kha:=0;trungbinh:=0;kem:=0;
writeln('Nhap so diem tung hoc sinh: ');
for i:=1 to n do
readln(a[i]);
for i:=1 to n do
begin
case a[i] of
8..10:gioi:=1+gioi;
6..7:kha:=1+kha;
5:trungbinh:=1+trungbinh;
0..4:kem:=1+kem;
end;
end;
writeln('Gioi: ',gioi,'HS, Kha: ',kha,'HS, Trungbinh: ',trungbinh,'HS, Kem: ',kem,'HS.');
readln;
end.