Convert decimal to binary · Compiler
Convert decimal to binary
Rewrite a nonnegative decimal integer in base two.
- Input
- One decimal integer from 0 to 1000000.
- Output
- Print its binary digits from most to least significant, with no leading zeroes. Print 0 for zero.
Compiler Explorer runs your code when you run or check it.
Loading your exercise draft…