title: Why does this print 4 and 12 after executing?
body: <p>So whenever I run this I get 4 and 12, but I don't understand why that is. I do understand that up until the if statement with (y mod x == 1) is where the code fails. So why does the output say 4 and 12 once this portion fails? Just looking for a nice explanation on why this is.</p>
  
  <pre><code>public static void main(String[] args) {
  
      int x = 10, y = 0;
      while (x &gt; 5)
      {
          y = 3;
          while (y &lt; x)
          {
              y *= 2;
              if (y % x == 1)
                  y += x;
          }
          x -= 3;
      }
      System.out.println(x + " " + y);
  }
  </code></pre>