a)
program Diem_trung_binh;
uses crt;
var i, n: integer;
giatriTB: real;
A: array[1..100] of real;
begin
clrscr;
write('Nhap so hoc sinh lop 8A: ');
readln(n);
writeln('Nhap diem cua moi ban:');
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
giatriTB:=giatriTB+a[i]
end;
giatriTB:=giatriTB/n;
writeln('Diem trung binh cua 50 hoc sinh lop 8A la: ', giatriTB:3:2);
readln
end.