RosettaCodeData/Task/Loops-With-multiple-ranges/Picat/loops-with-multiple-ranges-3.picat
2023-07-01 13:44:08 -04:00

16 lines
371 B
Text

% ...
foreach(J in [-Three..Three..3**3,
-Seven..X.. +Seven,
555..550-Y,
22..-Three..-28,
1927..1939,
X..Z..Y,
11**X..11**X + One
].flatten
)
Sum := Sum + abs(J),
if abs(Prod) < 2**27, J != 0 then
Prod := Prod * J
end
end,
% ...