program bai1;
uses crt;
var i,n: integer; Ban:array[1..100] of real; S:longint;
begin
clrscr;
write('Nhap vao so phan tu');
readln(n);
for i:=1 to n do
begin
write('Ban[',i,']=');
readln(Ban[i]);
end;
S:=1;
for i:=1 to n do
begin
if (Ban[i]>=8) then writeln('Ban[',i,'] gioi');
if (Ban[i]>=6.5) and (Ban[i]<8) then writeln('Ban[',i,'] kha');
if (Ban[i]<6.5) then writeln('Ban[',i,'] kem');
end;
readln;
end.
program bai1;
uses crt;
var i,n: integer; Ban:array[1..100] of real; S:longint;
begin
clrscr;
write('Nhap vao so phan tu');
readln(n);
for i:=1 to n do
begin
write('Ban[',i,']=');
readln(Ban[i]);
end;
S:=1;
for i:=1 to n do
begin
if (Ban[i]>=8) then writeln('Ban[',i,'] gioi');
if (Ban[i]>=6.5) and (Ban[i]<8) then writeln('Ban[',i,'] kha');
if (Ban[i]<6.5) then writeln('Ban[',i,'] kem');
end;
readln;
end.
program b1;
uses crt;
var i,n,gioi,kha,tb,kem:integer;
a:array[1..200] of real;
begin
clrscr;
write('Nhap tong so ban trong lop:');
readln(n);
for i:=1 to n do readln(a[i]);
gioi:=0; kha:=0; tb:=0; kem:=0;
for i:=1 to n do
begin
if (a[i]>=8) then inc(gioi);
if (6.5<=a[i]) and (a[i]<=7.9) then inc(kha);
if (5<=a[i]) and (a[i]<=6.4) then inc(tb);
if (a[i]<5) then inc(kem);
end;
writeln('So hoc sinh gioi la:',gioi);
writeln('So hoc sinh kha la:',kha);
writeln('So hoc sinh tb la:',tb);
writeln('So hoc sinh kem la:',kem);
readln;
end.