RosettaCodeData/Task/Square-but-not-cube/FutureBasic/square-but-not-cube.basic
2024-11-04 21:53:44 -08:00

23 lines
362 B
Text

void local fn DoIt
int s =1, c = 1, cube = 1, n = 0
while ( n < 30 )
int square = s * s
while ( cube < square )
c++
cube = c * c * c
wend
if ( cube == square )
text ,, _zRed
printf @"%d is square and cube",square
text
else
print square
n++
end if
s++
wend
end fn
fn DoIt
HandleEvents