Lời giải :
program hotrotinhoc ;
var a: array[1..30] of integer ;
i,n: integer ;
dtb : real;
begin
for i:= 1 to 30 do
begin
write('Diem cua ban thu ',i,':'); readln(a[i]);
end;
dtb:=0;
for i:= 1 to 30 do
dtb:=(dtb+a[i])/i ;
write('Diem trung binh cua cac ban la :',dtb);
readln
end.