Uses crt; Var i,pr:integer; a:array[1..17] of integer; Begin pr:=1; i:=1; writeln('Введите 17 чисел'); Repeat readln(a[i]); inc(i); Until i>17; i:=1; repeat if (a[i]>0) and (a[i] mod 17<>0) then pr:=pr*a[i]; inc(i) Until i>17; writeln('Произведение=',pr); readln; end.
Answers & Comments
Uses crt;
Var i,pr:integer;
a:array[1..17] of integer;
Begin
pr:=1;
i:=1;
writeln('Введите 17 чисел');
Repeat
readln(a[i]);
inc(i); Until i>17;
i:=1;
repeat
if (a[i]>0) and (a[i] mod 17<>0) then
pr:=pr*a[i];
inc(i)
Until i>17;
writeln('Произведение=',pr);
readln;
end.