Binary digits: Difference between revisions
Content added Content deleted
m (→{{header|SequenceL}}: Removing duplicate SequenceL. Webpage timed out ad request submitted twice.) |
(→{{header|Haskell}}: syntax highlighting doesn't support `'` --> use `1` instead) |
||
Line 1,161:
-- Implement our own version.
printToBin n = putStrLn $ printf "%4d %14s %14s" n (toBin n) (
main = do
putStrLn $ printf "%4s %14s %14s" "N" "toBin" "
mapM_ printToBin [5, 50, 9000]</lang>
Sample output:<pre>
N toBin
5 101 101
50 110010 110010
|