Join 136,124 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,790 people online right now. Registration is fast and FREE... Join Now!
You need to ask the input from user. You are currently fixing the lower and upper bound. Your loop should be like this while((lowerbound+1)<upperbound)