title: Count even and odd intergers until 0 is encountered
body: <p>Here is what I have to do:<br></p>
  
  <blockquote>
    <p>"Write a segment of code that reads a sequence of integers from the keyboard until the user enters a negative number.  It should then output a count of the number of even integers and the number of odd integers read (not including the final negative value in either count).  Remember - 0 is an even number.  For example, if the sequence is: 
    <pre>
  2
  7
  15
  5
  88
  1243
  104
  -1
  </pre>
    Then the output should be
   <pre>
  Number of even integers: 3
  Number of odd integers: 4
  </pre></p>
  </blockquote>
  
  <p>My code just keeps going even after inputting -1. I have a feeling I am missing a <code>{</code>somewhere or wrote the code wrong. Here is my code:</p>
  
  <pre><code>int oddCount = 0, evenCount = 0;
  Scanner in = new Scanner(System.in);
  while (oddCount&gt;=0&amp;&amp;evenCount&gt;=0){
          System.out.print("Enter an integer: ");
          int temp = in.nextInt();
          if (temp&gt;0) {
              if (temp%2==0)
                  evenCount = evenCount + 1;
              else oddCount = oddCount + 1;
              while (temp&gt;0);
          System.out.println("Number of even integers: "+evenCount);
          System.out.println("Number of odd integers: " +oddCount);
          }
      } 
  </code></pre>