1)
{$APPTYPE CONSOLE}
Var
U:array[1..10000] of integer;
h,k:integer;
Begin
Randomize;
Write('h = ');ReadLn(h);
Write('Исходный массив:');
For h:= 1 to h do
Begin
U[h]:=random(2*h+1)-h;
Write(' ',U[h])
End;
WriteLn;
Write('k = ');ReadLn(k);
For h:= 1 to h do
if U[h] = k then Write(h,' ');
ReadLn;
End.
2)
{$APPTYPE CONSOLE}
Var
B:array[1..10000,1..10000] of integer;
m,n,j,Max:integer;
Begin
Randomize;
Write('m = ');ReadLn(m);
Write('n = ');ReadLn(n);
For m:= 1 to m do
Begin
Max:=1;
For j:= 1 to n do
Begin
B[m,j]:=random(21)-10;
Write(B[m,j]:4);
if B[m,j] > B[m,Max] then Max:=j;
End;
WriteLn(', Max = ',B[m,Max],'[',m,',',Max,']');
End;
ReadLn
End.