Tham khảo:
program tinh_diem;
uses crt;
var N:array[1..10] of integer;
i,s: integer;
begin
for i:=1 to 10 do
begin
write('nhap diem trung binh cua hoc sinh thu ',i); readln(N[i]);
if N[i]<5 then s:=s+1;
end;
write('so hoc sinh co diem trung binh duoi 5 la: ',s);
readln;
end.