RosettaCodeData/Task/List-comprehensions/Icon/list-comprehensions-4.icon
2026-04-30 12:34:36 -04:00

5 lines
160 B
Text

procedure main(a)
n := !a | 20
s := [: 1([x := 1 to n, y := x to n, z := y to n], x^2+y^2 = z^2) :]
every b := !s do write(b[1]," ",b[2]," ",b[3])
end