1. Для одномерного массива вещественных чисел вычислить произведение значений тех элементов, которые не принадлежат отрезку [2;3]
Answers & Comments
danabel2000
Var i:integer; a:array[1..10] of real; p:real; begin p:=1; for i:=1 to 10 do begin readln(a[i]); if(a[i]<2)or(a[i]>3)then p:=p*a[i]; end; writeln('p=',p); end.
Answers & Comments
a:array[1..10] of real;
p:real;
begin
p:=1;
for i:=1 to 10 do begin
readln(a[i]);
if(a[i]<2)or(a[i]>3)then
p:=p*a[i];
end;
writeln('p=',p);
end.