Binary digits: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add Refal) |
(PascalABC.NET) |
||
Line 4,266: | Line 4,266: | ||
Time 0.175 secs, average stringlength 62.000 |
Time 0.175 secs, average stringlength 62.000 |
||
..the obvious version takes about 1.1 secs generating the string takes most of the time..</pre> |
..the obvious version takes about 1.1 secs generating the string takes most of the time..</pre> |
||
=={{header|PascalABC.NET}}== |
|||
<syntaxhighlight lang="pascal"> |
|||
begin |
|||
foreach var number in |5, 50, 9000| do |
|||
Writeln($'{number,4} - {Convert.ToString(number,2)}'); |
|||
end. |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
5 - 101 |
|||
50 - 110010 |
|||
9000 - 10001100101000 |
|||
</pre> |
|||
=={{header|Peloton}}== |
=={{header|Peloton}}== |
||
<syntaxhighlight lang="sgml"><@ defbaslit>2</@> |
<syntaxhighlight lang="sgml"><@ defbaslit>2</@> |
||
Line 4,274: | Line 4,288: | ||
<@ saybaslit>9000</@> |
<@ saybaslit>9000</@> |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
<syntaxhighlight lang="perl">for (5, 50, 9000) { |
<syntaxhighlight lang="perl">for (5, 50, 9000) { |