Program Matr;
Uses crt;
Var A:array[1..20,1..20] of integer; g:array[1..20] of integer;
i,j,min,k,m,n,nom:integer;
Begin
ClrScr; Randomize; min:=9999;
Write('n='); Readln(n);
Write('m='); Readln(m);
For i:=1 to n do
For j:=1 to m do
Begin
A[i,j]:=random(21)-10;
Write(A[i,j]:5); k:=k+1;
If k mod m=0 then Writeln;
g[j]:=1;
End;
j:=1;
Repeat
For i:=1 to n do
Begin
g[j]:=g[j]*A[i,j];
End;
j:=j+1;
Until j=m;
For j:=1 to n do
Begin
If g[j]<min then
Begin
min:=g[j];
nom:=j;
End;
End;
Write('min stolb:',nom); Readln;
End.
Uses crt;
Var A:array[1..20,1..20] of integer; g:array[1..20] of integer;
i,j,min,k,m,n,nom:integer;
Begin
ClrScr; Randomize; min:=9999;
Write('n='); Readln(n);
Write('m='); Readln(m);
For i:=1 to n do
For j:=1 to m do
Begin
A[i,j]:=random(21)-10;
Write(A[i,j]:5); k:=k+1;
If k mod m=0 then Writeln;
g[j]:=1;
End;
j:=1;
Repeat
For i:=1 to n do
Begin
g[j]:=g[j]*A[i,j];
End;
j:=j+1;
Until j=m;
For j:=1 to n do
Begin
If g[j]<min then
Begin
min:=g[j];
nom:=j;
End;
End;
Write('min stolb:',nom); Readln;
End.