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 17:42, 14 May 2019
, 5 years ago→{{header|Ring}}
(→Functional Python: Updated primitives and output, pylinted for Python 3, added {works with tag}) |
|||
Line 2,005:
see "wait for done..." + nl
while true
binpal =
terpal =
bool1 = ispalindrome(binpal)
bool2 = ispalindrome(terpal)
Line 2,020:
see "done..." + nl
func
if n = 0
return "0"
Line 2,026:
result = ""
while n > 0
result = string(n %
n = floor(n/
end
return result
Line 2,055 ⟶ 2,044:
return 0
ok
</lang>
{{out}}
|