Task

Show the first   30   positive integers which are squares but not cubes of such integers.

Optionally, show also the first   3   positive integers which are both squares and cubes,   and mark them as such.




0010 ZONE 5
0020 cube_n#:=0;square_n#:=0;seen#:=0
0030 WHILE seen#<30 DO
0040   WHILE cube_n#^3<square_n#^2 DO cube_n#:+1
0050   IF cube_n#^3<>square_n#^2 THEN
0060     PRINT square_n#^2,
0070     seen#:+1
0080     IF seen# MOD 5=0 THEN PRINT
0090   ENDIF
0100   square_n#:+1
0110 ENDWHILE
0120 END