Program Phan_loai; uses crt; Var i, n, G, Kh, TB, K: integer; A: array[1..100] of real; Begin clrscr; write('Nhap so HS trong lop, n= '); readln(n); writeln('Nhap diem :'); For i:=1 to n do Begin write(i,' . '); readln(a[i]); End; G:=0; Kh:= 0; TB:= 0; K:= 0; for i:=1 to n do Begin if a[i] >= 8.0 then G:= G + 1; if a[i] <5.0 then K:= K + 1; if (a[i] =6.5) then Kh:= Kh + 1; if (a[i] >= 5 ) and (a[i] < 6.5) then TB:= TB + 1; end; writeln(' Ket qua hoc tap: '); writeln(G, ' ban hoc gioi '); writeln(Kh, ' ban hoc kha '); writeln(TB, ' ban hoc trung binh'); writeln(K, ' ban hoc kem '); Readln; End.
Program Phan_loai;
uses crt;
Var i, n, G, Kh, TB, K: integer;
A: array[1..100] of real;
Begin
clrscr;
write('Nhap so HS trong lop, n= ');
readln(n);
writeln('Nhap diem :');
For i:=1 to n do
Begin
write(i,' . ');
readln(a[i]);
End;
G:=0; Kh:= 0; TB:= 0; K:= 0;
for i:=1 to n do
Begin
if a[i] >= 8.0 then G:= G + 1;
if a[i] <5.0 then K:= K + 1; if (a[i] =6.5) then Kh:= Kh + 1;
if (a[i] >= 5 ) and (a[i] < 6.5) then TB:= TB + 1;
end;
writeln(' Ket qua hoc tap: ');
writeln(G, ' ban hoc gioi ');
writeln(Kh, ' ban hoc kha ');
writeln(TB, ' ban hoc trung binh');
writeln(K, ' ban hoc kem ');
Readln;
End.