Re: C++ help!
There definitely is an easier way to write this. I wrote a similar program fro a number guessing game where the computer would tell you how far off you were. What you have to do is make the computer ask (assuming input is from 0-100) if your number is greater or lower than the midpoint of the range:
"Is your number greater than or less than 50?"
Then whatever answer you get you divide the new range again. So if the user answers "lower" the computer will ask:
"Is your number greater than or less than 25?"
You keep this going until the range is 1. To do this you can create a while-loop that will test while some Boolean variable is false. Definite it correct, or guess, or something. When the person guesses it correctly, you change it to true and snap out of the loop. You can then create variables for the upper, lower, and midpoint of the range. Depending on the user's answer you change an old upper or lower to the old midpoint. Then to find the new midpoint you find the difference in the range, divide it by two, and add/subtract from the lower/upper (doesn't matter which you do so long add to the lower or subtract from the upper).
If you don't know loops look for a quick tutorial on google, or if you want I'll teach it real quick.