Код: Выделить всё
Uses crt;
Type
XP=^INTEGER;
VectXP=ARRAY [0..100] of XP;
PVectXP=^VectXP;
Var
n,i,j: integer;
Arr: PVectXP;
function Max(A:PVectXP; Size:integer):integer;
var
i,r:integer;
begin
if Size>0 then
begin
r:=A^[1]^;
for i:=1 to Size do if A^[i]^>r
then r:=A^[i]^;
end else r:=0; Max:=r;
end;
Begin
clrscr;
randomize;
for j:=1 to 10 do
begin
for i:=1 to 10 do A^[i]^:=random(100+10); }
write('Vvedite koli4estvo elementov ot 10 do 100: ');
read(n);
GetMem(Arr,sizeof(XP)*n);
for i:=1 to n do
begin
New(Arr^[i]);
write('vvedite ',i,' 4islo: ');
read(Arr^[i]^);
end;
writeln('maximum = ',Max(Arr,n));
readln;
for i:=1 to n do
Dispose(Arr^[i]);
FreeMem(Arr,sizeof(XP)*n);}
readln;
End.