title: Do while loop for guessing game
body: <p>I am writing a simple java guessing game, the game is supposed to randomly pick a number between 1 and 100 and then after you pick the correct number it asks you if you would like to play again.  I know i should be able to use a Do while loop to ask if the user would like to play again, but every time I try I cannot make it work.  This is my fully functional program without the do while loop.  If someone could help me prompt the user if they would like to play again I would be very thankful.  I am still very new to programming.
  Also I apologize if the indenting isn't 100% correct.</p>
  
  <pre><code>import java.util.Scanner;
  import java.util.Random;
  public class GuessingGame
  {
     public static void main (String [] args)
     {
  
  
    //Variables
    Random randomNumber = new Random();
    Scanner kbd = new Scanner(System.in);
    int computerValue = randomNumber.nextInt(100);
    int numberOfTries = 0;
    int success = 0;
    int guess = 0;
  
  
    //Logic and While Loop
  
  
  
     while (success ==0)
       {
          System.out.println("please enter an integer betwen 1 and 100 inclusive: ");
          guess = kbd.nextInt();
          numberOfTries++;
  
             if (guess &lt; 1 || guess &gt; 100){
                System.out.println("Invalid input");
             }
  
             else if (guess == computerValue){
                success++;
                System.out.println("Congratulations you won! Your numbers of tries was: " + numberOfTries + " and the number was: " + computerValue);
  
             }
             else if (guess &lt; computerValue){
                System.out.println("Your guess is too low!");
             }
             else if (guess &gt; computerValue){
                System.out.println("Your guess is too high!");
      }
      }
  
  
  
     }
  }
  </code></pre>