Hello
I wrote this program to convert integer to binary and it works
Code:while (decimal != 0) { printf ("%d",decimal % 2); decimal = decimal /2; }
How can I modify this that it prints something like "0000 0000 0000 0000"
for example when the user inputs 2 the program would print: "0000 0000 0000 0010"
I'v spend three days to figure this out, but I couldn't, Any help is appreciated.
Thanks