title: Programs counting even and odd numbers
body: <p>I'm self-studying C and I'm trying to make 2 programs for exercise:</p>
  
  <ol>
  <li><p>the first one takes a number and check if it is even or odd;
  This is what I came up with for the first one:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main(){
        int n;
        printf("Enter a number that you want to check: ");
        scanf("%d",&amp;n);
        if((n%2)==0)      
             printf("%d is even.",n);
        else
             printf("%d is odd.",n);
        return 0;
  }
  </code></pre></li>
  <li><p>the second one should take <em>n</em> numbers as input and count the number of even numbers, odd numbers, and zeros among the numbers that were entered. The output should be the number of  even numbers, odd numbers, and zeros.</p></li>
  </ol>
  
  <p>I would like to ask how to implement the loop in this case: how can I set an EOF value if every integer is acceptable (and so I cannot, say, put 0 to end)? Can you show me how to efficiently build this short code?</p>