Square but not cube: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) (Added Arturo implementation) |
Not a robot (talk | contribs) (Add FOCAL) |
||
Line 816: | Line 816: | ||
<pre>4 9 16 25 36 49 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 784 841 900 961 1024 1089</pre> |
<pre>4 9 16 25 36 49 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 784 841 900 961 1024 1089</pre> |
||
=={{header|FOCAL}}== |
|||
<lang FOCAL>01.10 S C=1;S S=1;S Q=1;S R=1;S N=1 |
|||
01.20 I (N-30)1.3,1.3,1.8 |
|||
01.30 S S=Q*Q |
|||
01.40 I (S-C)1.6,1.7,1.5 |
|||
01.50 S R=R+1;S C=R*R*R;G 1.4 |
|||
01.60 S N=N+1;T %4,S,! |
|||
01.70 S Q=Q+1;G 1.2 |
|||
01.80 Q</lang> |
|||
{{out}} |
|||
<pre style='height: 50ex;'>= 4 |
|||
= 9 |
|||
= 16 |
|||
= 25 |
|||
= 36 |
|||
= 49 |
|||
= 81 |
|||
= 100 |
|||
= 121 |
|||
= 144 |
|||
= 169 |
|||
= 196 |
|||
= 225 |
|||
= 256 |
|||
= 289 |
|||
= 324 |
|||
= 361 |
|||
= 400 |
|||
= 441 |
|||
= 484 |
|||
= 529 |
|||
= 576 |
|||
= 625 |
|||
= 676 |
|||
= 784 |
|||
= 841 |
|||
= 900 |
|||
= 961 |
|||
= 1024 |
|||
= 1089</pre> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |