Binary digits: Difference between revisions
Content added Content deleted
(add scala) |
|||
Line 219: | Line 219: | ||
print(toBinary(demoValues[i])); // alert() in a browser, wscript.echo in WSH, etc. |
print(toBinary(demoValues[i])); // alert() in a browser, wscript.echo in WSH, etc. |
||
}</lang> |
}</lang> |
||
Output: |
|||
<pre>101 |
|||
110010 |
|||
10001100101000</pre> |
|||
=={{header|Locomotive Basic}}== |
|||
<lang locobasic>10 PRINT BIN$(5) |
|||
20 PRINT BIN$(50) |
|||
30 PRINT BIN$(9000)</lang> |
|||
Output: |
Output: |
||
<pre>101 |
<pre>101 |