Find palindromic numbers in both binary and ternary bases: Difference between revisions
Find palindromic numbers in both binary and ternary bases (view source)
Revision as of 12:52, 12 May 2022
, 2 years ago→{{header|Arturo}}
Drkameleon (talk | contribs) (Added Arturo implementation) |
Drkameleon (talk | contribs) |
||
Line 276:
print [
pad (to :string 0)++" :" 14
pad.right join to [:string] digits.base:2 0
join to [:string] digits.base:3 0
]
Line 291:
print [
pad (to :string n)++" :" 14
pad.right join to [:string] digits.base:2 n
join to [:string] digits.base:3 n
]
Line 306:
{{out}}
<pre> 0 : 0
1 : 1
6643 : 1100111110011
1422773 : 101011011010110110101
5415589 : 10100101010001010100101
90396755477 : 1010100001100000100010000011000010101
=={{header|C}}==
|