Program HOC24;
var i,n,max: integer;
a: array[1..1000] of integer;
begin
write('Nhap n: '); readln(n);
i:=1; max:=-1;
while i<=n do
begin
write('Nhap so thu ',i,': '); readln(a[i]);
if a[i]>max then max:=a[i];
i:=i+1;
end;
write('So lon nhat la: ',max);
readln
end.
Đúng 1
Bình luận (0)