Square but not cube: Difference between revisions

m (added whitespace and highlighting.)
Line 1,448:
1024
1089</pre>
 
=={{header|jq}}==
{{works with|jq}}
'''Works with gojq, the Go implementation of jq'''
<lang jq>
def squares_not_cubes:
def icbrt: pow(10; log10/3) | round;
range(1; infinite)
| (.*.)
| . as $sq
| icbrt
| select( (.*.*.) != $sq)
| $sq;
limit(30; squares_not_cubes)
</lang>
{{out}}
<pre>
4
9
16
25
...
900
961
1024
1089
</pre>
 
 
 
=={{header|Julia}}==
2,460

edits