IDNLearn.com provides a collaborative platform for sharing and gaining knowledge. Ask your questions and receive comprehensive and trustworthy answers from our experienced community of professionals.

Write a program binary.cpp that reads a positive integer and prints all of its binary digits.

Sagot :

Answer:

View image below.

Explanation:

They're just asking you to create a num2bin function on Cpp.

If you search for "num2bin in C", you can find a bunch of answers for this if you think my solution is too confusing.

One way to do it is the way I did it in the picture.

Just copy that function and use it in your program. The rest you can do yourself.

View image GrandNecro