1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help with binary representation in C++

Discussion in 'C++' started by jumpdlite, Sep 1, 2010.

  1. jumpdlite

    jumpdlite New Member

    Sep 1, 2010
    Likes Received:
    Trophy Points:
    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.

Share This Page