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.




get "libhdr"
 
let square(x) = x * x
let cube(x) = x * x * x
 
let start() be
$(  let c, s, seen = 1, 1, 0
    while seen < 30 do
    $(  while cube(c) < square(s) do c := c + 1
        if square(s) ~= cube(c) then
        $(  writed(square(s), 5)
            seen := seen + 1
            if seen rem 5 = 0 then wrch('*N')            
        $)
        s := s + 1
    $)
$)