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.




HAI 1.2
 
I HAS A SkwareKyoobs ITZ A BUKKIT
I HAS A NumbarSkwareKyoobs ITZ 0
I HAS A NotKyoobs ITZ 0
 
I HAS A Index ITZ 1
I HAS A Skware ITZ 1
I HAS A Kyoob ITZ 1
I HAS A Root ITZ 1
 
VISIBLE "Skwares but not kyoobs::"
 
IM IN YR Outer UPPIN YR Dummy WILE DIFFRINT NotKyoobs AN 30
 
   Skware R PRODUKT OF Index AN Index
 
   IM IN YR Inner UPPIN YR OtherDummy WILE DIFFRINT Kyoob AN BIGGR OF Skware AN Kyoob
      Root R SUM OF Root AN 1
      Kyoob R PRODUKT OF PRODUKT OF Root AN Root AN Root
   IM OUTTA YR Inner
 
   BOTH SAEM Skware AN Kyoob, O RLY?
     YA RLY
       SkwareKyoobs HAS A SRS NumbarSkwareKyoobs ITZ Skware
       NumbarSkwareKyoobs R SUM OF NumbarSkwareKyoobs AN 1
     NO WAI
       BOTH SAEM Kyoob AN BIGGR OF Skware AN Kyoob, O RLY?
         YA RLY
           VISIBLE SMOOSH Skware " " MKAY !
           NotKyoobs R SUM OF NotKyoobs AN 1
       OIC
   OIC
 
 
   Index R SUM OF Index AN 1
IM OUTTA YR Outer
 
VISIBLE ""
VISIBLE ""
VISIBLE "Both skwares and kyoobs::"
IM IN YR Output UPPIN YR Index WILE DIFFRINT Index AN NumbarSkwareKyoobs
  VISIBLE SMOOSH SkwareKyoobs'Z SRS Index " " MKAY !
IM OUTTA YR Output
VISIBLE ""
 
KTHXBYE