uses crt;
var a:array[1..100]of integer;
i,n,tam,j:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
for i:=1 to n-1 do
for j:=i+1 to n do
if (a[i]>a[j]) then
begin
tam:=a[i];
a[i]:=a[j];
a[j]:=tam;
end;
writeln(a[n-1]);
readln;
end.
Đúng 2
Bình luận (0)