title: How do I output the number loops in after a while()?
body: <p>Im trying to get the output for the number of times the loop was ran over, decided by the user. Im using <code>while()</code> but I'm not sure how to output the number of loops once the loop is over.</p>
  <p>Here's my code:</p>
  <pre><code>public class RockPaperScissors {
  
      public static void main(String[] args) {
          Scanner input = new Scanner(System.in);
          System.out.println(&quot;Choose a number between 2 and 10, choose 1 to end it&quot;);
          int number1 = input.nextInt();
          
          System.out.println(&quot;You Chose Number &quot; + number1);
          while (number1 != 1) {
             System.out.println(&quot;Choose a number between 2 and 10, choose 1 to end it&quot;);
             number1 = input.nextInt();
             System.out.println(&quot;You Chose Number &quot; + number1);
          }
          
          System.out.println(&quot;Thank you for choosing. Goodbye&quot;);
      }       
  }
  </code></pre>
  <p>please help me thank you !!</p>