Binary digits: Difference between revisions

Content added Content deleted
(→‎{{header|Kotlin}}: changed the kotlin example to not use java)
Line 2,145: Line 2,145:
for (Int test : tests)
for (Int test : tests)
{
{
console.println($"The decimal value {num(test)} should produce an output of {bin(test)}");
console.print($"The decimal value {num(test)} should produce an output of {bin(test)}");
}
}
}
}
Line 2,151: Line 2,151:
</syntaxhighlight>
</syntaxhighlight>


{{out}}
Output:
<pre>
<syntaxhighlight>
The decimal value 0 should produce an output of 0
The decimal value 0 should produce an output of 0
The decimal value 1 should produce an output of 1
The decimal value 1 should produce an output of 1
Line 2,158: Line 2,158:
The decimal value 50 should produce an output of 110010
The decimal value 50 should produce an output of 110010
The decimal value 9000 should produce an output of 10001100101000
The decimal value 9000 should produce an output of 10001100101000
</pre>
</syntaxhighlight>


=={{header|Elena}}==
=={{header|Elena}}==