- Sep 29, 2000
- 2,157
- 0
- 0
something as simple as:
while (i != 0)
{
(head, i) = i >> 1;
print("%d", head);
}
To print out a number in binary.
Instead, you have to futz around with bit masks and any number of other hacks to get this to work.
while (i != 0)
{
(head, i) = i >> 1;
print("%d", head);
}
To print out a number in binary.
Instead, you have to futz around with bit masks and any number of other hacks to get this to work.