RosettaCodeData/Task/List-comprehensions/Icon/list-comprehensions-3.icon
2023-07-01 13:44:08 -04:00

5 lines
179 B
Text

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