Program Task; Const N = 5; max = 25; Var a: Array [1..N, 1..N] of Integer; i, j, ir, jr: Integer; Begin Randomize; For i := 1 To N Do For j := 1 To N Do a[i, j] := Random(max * 2) - max + 1; WriteLn('Матрица: '); For i := 1 To N Do Begin For j := 1 To N Do Write(a[i, j], ' '); WriteLn; End;a[i, j] := Random(50) - 25; ir := 1; jr := 1; For i := 1 To N Do For j := 1 To N Do If a[i, j] < a[ir, jr] Then Begin ir := i; jr := j; End; WriteLn('Столбец минимального элемента: ', jr); ReadLn; End.
Const N = 5; max = 25;
Var a: Array [1..N, 1..N] of Integer;
i, j, ir, jr: Integer;
Begin
Randomize;
For i := 1 To N Do
For j := 1 To N Do
a[i, j] := Random(max * 2) - max + 1;
WriteLn('Матрица: ');
For i := 1 To N Do
Begin
For j := 1 To N Do
Write(a[i, j], ' ');
WriteLn;
End;a[i, j] := Random(50) - 25;
ir := 1;
jr := 1;
For i := 1 To N Do
For j := 1 To N Do
If a[i, j] < a[ir, jr] Then
Begin
ir := i;
jr := j;
End;
WriteLn('Столбец минимального элемента: ', jr);
ReadLn;
End.