uses crt;
function Max(y:array of real):real;
var i:integer;
mx:real;
begin
mx:=y[0];
for i:=0 to high(y) do
if y[i]>mx then mx:=y[i];
Max:=mx;
end;
const nmax=100;
var a:array[1..nmax] of real;
n,i:byte;
begin
clrscr;
randomize;
repeat
write('Размер массива до ',nmax,' n=');
readln(n);
until n in [1..nmax];
writeln('Массив А:');
for i:=1 to n do
begin
a[i]:=10*random;
write(a[i]:5:2);
end;
writeln;
writeln('Максимальный элемент=',Max(a):0:2);
readln
end.