Дан массив С15. Найти произведение ненулевых элементов. Язык Паскаль
var
c : array [1..15] of real;
s : real;
i : byte;
begin
s := 0;
for i := 1 to 15 do read (a[i]);
for i := 1 to 15 do
if a[i] <> 0 then
s := s * a[i];
writeln (s);
end.
var c : array [1..15] of real; s : real; i : byte; begin s := 1; for i := 1 to 15 do read (a[i]); for i := 1 to 15 do if a[i] <> 0 then
s := s * a[i]; writeln (s); end.