program Phanloai;
uses crt;
Var i, n, Gioi, Kha, Trungbinh, Kem: integer;
A: array[1..100] of real;
Begin
clrscr;
write('Nhap so cac ban trong lop, n = '); readln(n);
writeln('Nhap diem:');
For i:=1 to n do Begin write(i,'.'); readln(a[i]); End;
Gioi:=0; Kha:=0; Trungbinh:=0; Kem:=0;
for i:=1 to n do
begin
if a[i]>=8.0 then Gioi:=Gioi+1;
if a[i]<5 then Kem:=Kem+1;
if (a[i]<8.0) and (a[i]>=6.5) then Kha:=Kha+1;
if (a[i]>=5) and (a[i]<6.5) then Trungbinh:=trungbinh+1
end;
writeln('Ket qua hoc tap:');
writeln(Gioi,' ban hoc gioi');
writeln(Kha,' ban hoc kha');
writeln(Trungbinh,' ban hoc trung binh');
writeln(Kem,' ban hoc kem');
readln
End.