RosettaCodeData/Task/List-comprehensions/Run-BASIC/list-comprehensions.basic

8 lines
134 B
Plaintext

for x = 1 to 20
for y = x to 20
for z = y to 20
if x^2 + y^2 = z^2 then print "[";x;",";y;",";z;"]"
next z
next y
next x