Binary digits: Difference between revisions

Content added Content deleted
(→‎Roc: add)
imported>Arakov
Line 2,211: Line 2,211:


=={{header|Elena}}==
=={{header|Elena}}==
ELENA 5.0 :
ELENA 6.x :
<syntaxhighlight lang="elena">import system'routines;
<syntaxhighlight lang="elena">import system'routines;
import extensions;
import extensions;
Line 2,217: Line 2,217:
public program()
public program()
{
{
new int[]{5,50,9000}.forEach:(n)
new int[]{5,50,9000}.forEach::(n)
{
{
console.printLine(n.toString(2))
console.printLine(n.toString(2))
Line 2,228: Line 2,228:
10001100101000
10001100101000
</pre>
</pre>

=={{header|Elixir}}==
=={{header|Elixir}}==
Use <code>Integer.to_string</code> with a base of 2:
Use <code>Integer.to_string</code> with a base of 2: