Pmin str stolbcy minimalnym proizvedeniem for to do begin for to do be

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
i := 0;
j := 0;
b := [];
Pmin := 1;
str := "stolbcy s minimalnym proizvedeniem:";
for j = 1 to N do
begin
P := 1;
for i = 1 to M do
begin
P := P * a[i,j];
end;
if (j = 1) then Pmin := P;
else
if (Pmin > P) then Pmin := P;
b[j] := P;
end;
println("Minimalnoe proizvedenie: " + Pmin);
for j := 1 to N do
if (b[j] = Pmin) then str := str + " " + inttostr(j);
println(str);