Lời giải :
program hotrotinhoc ;
var a: array[1..100] of real ;
i,n,T : integer ;
s: real ;
Begin
write('Nhap so luong hoc sinh trong lop'); Readln(n);
writeln('Nhap diem cua cac ban hoc sinh');
for i:= 1 to n do
begin
write('Nhap diem cua ban thu',i,':'); readln(a[i]);
end;
T:=1; s:=0;
for i:= 2 to n do
begin
if T<a[i] then T:=a[i] ;
s:=s+a[i];
end;
write('Diem thi cao nhat lop la:',T);
write('Diem trung binh cua ca lop la',s);
readln
end.