Ответ:
program test;
var
x: Array [1..15] of integer = (-1,0,2,8,0,3,14,56,8,1,-18,-9,-7,-2,-7);
mult: real;
i: byte;
begin
mult:=1;
for i := 1 to 15 do
if (x[i]<>0) then
mult:=x[i]*mult
end;
write('Произведение элементов в массиве: ',mult);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
program test;
var
x: Array [1..15] of integer = (-1,0,2,8,0,3,14,56,8,1,-18,-9,-7,-2,-7);
mult: real;
i: byte;
begin
mult:=1;
for i := 1 to 15 do
begin
if (x[i]<>0) then
mult:=x[i]*mult
end;
write('Произведение элементов в массиве: ',mult);
end.