/**
 * A reverse guessing game
 * @author Ryan Closner
 * @version 11/5/2012
 **/

import java.util.*;

class Guess
{

    // Initialize the upper and lower bounds for the guessing game.

    private static final int MIN = 0;
    private static final int MAX = 100;

    public static void main (String[] args)
    {

        Scanner in = new Scanner( System.in );
        String answer;
        char letter;

        int guesses = 0;
        int guess = 0;
        boolean guessing = true;

        int min = MIN;
        int max = MAX;

        // Print the instructions.

        System.out.println("This program has you, the user, choose a number between");
        System.out.println(MIN + " and " + MAX + ". Then I, the computer, will try my best to");
        System.out.println("guess it.\n");

        System.out.println("If I guess a number that’s SMALLER than the");
        System.out.println("secret number, respond by typing the letter 's'. If I");
        System.out.println("guess a number that’s BIGGER than the secret number,");
        System.out.println("respond by typing the letter 'b'. And if I guess");
        System.out.println("CORRECTLY, respond by typing the letter 'c'.\n");

        // Keep guessing until the correct answer has been guessed.

        while (guessing) {
            // Set the value of the guess.

            guess = (max - min) / 2 + min;

            System.out.print("Is it " + guess + "? (type s, b, or c): ");
            answer = in.nextLine();
            letter = answer.charAt(0);

            if (letter == 's') {
                max = guess;
            } else if (letter == 'b') {
                min = guess;
            } else if (letter == 'c') {
                guessing = false;

                // Ensure the singular form is used when relevant.

                if (guesses > 1) {
                    System.out.print("I got it after making just " + guesses + " guesses");
                } else {
                    System.out.print("I got it after making just " + guesses + " guess");
                }

                continue;
            } else {
                System.out.println("Invalid answer.");
                continue;
            }

            guesses++;
        }
    }

}

@@ -1291,24 +1291,25 @@
 guessing) %7B%0A
+%0A
             
@@ -1384,16 +1384,127 @@
 + min;%0A%0A
+            // Increment the number of guesses%0A%0A            guesses++;%0A%0A            // Ask for guess feedback%0A%0A
         
@@ -1641,24 +1641,56 @@
 charAt(0);%0A%0A
+            // Digest response%0A%0A
             
@@ -1886,362 +1886,94 @@
 se;%0A
-%0A                // Ensure the singular form is used when relevant.%0A%0A                if (guesses %3E 1) %7B%0A                    System.out.print(%22I got it after making just %22 + guesses + %22 guesses%22);%0A                %7D else %7B%0A                    System.out.print(%22I got it after making just %22 + guesses + %22 guess%22);%0A                %7D%0A%0A                continue
+                System.out.print(%22I got it after making just %22 + guesses + %22 guesses%22)
 ;%0A  
@@ -2062,59 +2062,9 @@
     
-    continue;%0A            %7D%0A%0A            guesses++;
+%7D
 %0A   

Move guessing increment to the top of the loop