i am to write a C++ program to output the binary (base – 2) representation of a decimal integer. the program should accept a positive integer from the user. After verifying that the input is valid, the program should call a function named toBin, which outputs the binary representation of the number.
The function toBin must not be a recursive function.
I am a beginner in C++.I don't know where to start and don't really understand the question. It would be really helpful if someone could show me an example of what i am supposed to do. Thank you.