Binary digits: Difference between revisions
Content deleted Content added
m promoted to task |
→{{header|Perl 6}}: Add Perl 5 version. |
||
Line 199: | Line 199: | ||
=={{header|PARI/GP}}== |
=={{header|PARI/GP}}== |
||
<lang parigp>bin(n:int)=concat(apply(s->Str(s),binary(n)))</lang> |
<lang parigp>bin(n:int)=concat(apply(s->Str(s),binary(n)))</lang> |
||
=={{header|Perl}}== |
|||
<lang perl> |
|||
for (5, 50, 9000) { |
|||
printf "%b\n", $_; |
|||
}</lang> |
|||
<pre> |
|||
101 |
|||
110010 |
|||
10001100101000 |
|||
</pre> |
|||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |