===== PascalABC.NET =====
begin
var a:= ArrRandom(60, -150, 100);
a.Println;
var (s, p) := (0, BigInteger.One);
foreach var m in a do
if (m > 10) and (m <= 30) then
s += m;
p *= m
end;
Println('Сумма', s, ' произведение', p)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
===== PascalABC.NET =====
begin
var a:= ArrRandom(60, -150, 100);
a.Println;
var (s, p) := (0, BigInteger.One);
foreach var m in a do
if (m > 10) and (m <= 30) then
begin
s += m;
p *= m
end;
Println('Сумма', s, ' произведение', p)
end.