2 câu trả lời
uses crt;
var i,max:integer;
n:array[-4898..4898] of extended;
begin
write('nhap n:');readln(n);
max:=n[1];
for i:=1 to lenght(n) do if n[i] >max then max:=n[i];
writeln('Max=',max);
readln;
end.
uses crt;
var a:array[-1000..10000] of extended;
n,max:extended;
i:longint;
begin
clrscr;
write('so luong phan tu: ');
readln(n);
i:=1;
repeat
begin
write('a[',i,']=');
readln(a[i]);
i:=i+1;
end;
until
i>n;
max:=a[1];
while i<=n do
if max<a[i] then
begin
max:=a[i];
i:=i+1;
end;
writeln('gia tri lon nhat',max:5:2);
readln
end.