Non-decimal radices/Output: Difference between revisions
Content added Content deleted
(GP) |
|||
Line 447: | Line 447: | ||
Printf.printf " %3o %2d %2X\n" n n n (* binary not supported *) |
Printf.printf " %3o %2d %2X\n" n n n (* binary not supported *) |
||
done</lang> |
done</lang> |
||
=={{header|PARI/GP}}== |
|||
The only bases supported by the language itself (as opposed to custom functions) are binary and decimal. |
|||
<lang parigp>printbinary(n)={ |
|||
n=binary(n); |
|||
for(i=1,#n,print1(n[i])) |
|||
};</lang> |
|||
=={{header|Perl}}== |
=={{header|Perl}}== |