title: Java: stuck in a loop
body: <p>I'm trying to create a program that takes 12 ints between 0 and 100, and puts them into an array.. then then two arrays multiply and the resulting 6 ints should go into a final array. But when I try to execute I'm able to enter the ints but nothing happens, I've a sneaky suspicion im stuck in a loop somewhere. Any advice would be appreciated.</p>
  
  <p><strong>note</strong></p>
  
  <p>I haven't included the calculations for the 2nd array as that's not where the problem is.. I can't even get to the 2nd array as its getting stuck somewhere</p>
  
  <pre><code>import java.util.*;
  
  public class Calc {
      static int[] level = { 60, 40, 20, 30, 40, 70 };
  
      public static void workOut()
      {
          // after accepting an array of 12 ints should compute array of 6
  
  
          //  array declaration
          int[] nums = new int[12];
  
          Scanner sc = new Scanner(System.in);
          System.out.println("Enter int 1 then int 1a,");
          System.out.print("then int 2 then int 2a etc, until int 6 and 6a");
  
  
          if (!sc.hasNextInt())
          {
              System.out.println("Must be Int!");  
          }
          else
          {
              while (sc.hasNextInt())
              {
                  for (int i = 0; i &lt; 12; i++)
                  {
  
                      if (sc.nextInt() &gt;= 0 &amp;&amp; sc.nextInt() &lt;= 100)
                      {
                          nums[i] = sc.nextInt();
                      }              
                      else
                      {
                          System.out.print("Number between 0 and 100 please");
                      }
                  }
              }   
          }
      }
  }
  </code></pre>