#include using namespace std; int main(void) { int max, min; //start and end of our range int choice; //choice for the menu int guess; //our guess int count = 0; //number of guesses max = 100; min = 1; do { guess = (max + min) / 2; count++; cout << "My Guess is: " << guess << endl; cout << " 1.) Too Low" << endl << " 2.) Too High" << endl << " 3.) Correct" << endl; cout << "How did I do? "; cin >> choice; if(choice == 1) min = guess; if(choice == 2) max = guess; } while(choice != 3); //gloat over our victory cout << "I win! It only took me " << count << " tries!" << endl; return 0; }