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.




OpenConsole()
lv=1
Repeat
  s+1 : s2=s*s : Flg=#True
  For i=lv To s
    If s2=i*i*i 
      tx3$+Space(Len(tx2$)-Len(tx3$))+Str(s2) 
      tx2$+Space(Len(Str(s2))+1) 
      Flg=#False : lv=i : c-1 : Break 
    EndIf
  Next 
  If Flg : tx2$+Str(s2)+" " : EndIf
  c+1  
Until c>=30
PrintN("s²   : "+tx2$) : PrintN("s²&s³: "+tx3$)
Input()