Программа:
Pascal:
const N = 5; const M = 2;
var
C: array[1..M, 1..N] of real;
i, j: integer;
K, proiz: real;
begin
writeln('K = '); readln(K);
proiz := 1;
for i := 1 to M do
for j := 1 to N do begin
C[i,j] := random * (100 - 50) + 50;
if C[i, j] < K then proiz := proiz * C[i,j];
end;
writeln(C); writeln(proiz);
end.
Программа:
Pascal:
const N = 5; const M = 2;
var
C: array[1..M, 1..N] of real;
i, j: integer;
K, proiz: real;
begin
writeln('K = '); readln(K);
proiz := 1;
for i := 1 to M do
for j := 1 to N do begin
C[i,j] := random * (100 - 50) + 50;
if C[i, j] < K then proiz := proiz * C[i,j];
end;
writeln(C); writeln(proiz);
end.