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.




C :sqr=1
C :cbr=1
C :sq=1
C :cb=1
C :n=0
 
*square
U (sq>cb):*cube
C (sq<cb):n=n+1
T (sq<cb):#sq
C :sqr=sqr+1
C :sq=sqr*#sqr
J (n<30):*square
E :
 
*cube
C :cbr=cbr+1
C :cb=(cbr*#cbr)*#cbr
J (sq>cb):*cube
E :