Show the (decimal) value of a number of 1s appended with a 3, then squared: Difference between revisions
Show the (decimal) value of a number of 1s appended with a 3, then squared (view source)
Revision as of 10:19, 3 June 2021
, 3 years agoAdded Quackery.
(Added Quackery.) |
|||
Line 364:
7 11111113 123456832098769
</pre>
=={{header|Quackery}}==
<lang Quackery> [ char 1 swap of
char 3 join
$->n drop ] is 1's+3 ( n -> n )
8 times
[ i^ 1's+3
dup echo
say " --> "
dup * echo cr ]</lang>
{{out}}
<pre>3 --> 9
13 --> 169
113 --> 12769
1113 --> 1238769
11113 --> 123498769
111113 --> 12346098769
1111113 --> 1234572098769
11111113 --> 123456832098769</pre>
=={{header|PARI/GP}}==
|