title: Create a program that counts number of odd, even and zero numbers C++
body: <pre class="lang-css prettyprint-override"><code>#include &lt;iostream&gt;using namespace std;
  const int LIMIT=10;
  int main () {
    float counter;
    int number=0;
    int zeros=0;
    int odds=0;
    int evens=0;
    cout &lt;&lt; "Please enter " &lt;&lt; LIMIT &lt;&lt; " integers, " &lt;&lt; "positive, negative, or zeros." &lt;&lt; endl;
    cout &lt;&lt; "The numbers you entered are:" &lt;&lt; endl;
    for (counter=1;      counter &lt;=LIMIT;      counter++) {
      cin&gt;&gt;number;
      switch (number / 2) {
        case 0: evens++;
        if (number=0) zeros++;
        case 1: case -1: odds++;
      }
    }
    cout &lt;&lt; endl;
    cout &lt;&lt; "There are " &lt;&lt; evens &lt;&lt; " evens, " &lt;&lt; "which includes " &lt;&lt; zeros &lt;&lt; " zeros." &lt;&lt; endl;
    cout &lt;&lt; "The number of odd numbers is: " &lt;&lt; odds &lt;&lt; endl;
    return 0;
  }
  </code></pre>
  
  
  
  <p>Hi All,</p>
  
  <p>I have a varsity question which has had me stumped all day. I need to amend the above script to allow me to enter 10 variable integers and the program must return me the total number of even numbers, total number of odd numbers and total number of zeros.</p>
  
  <p>I have tried multiple solutions including (number % 2 == 0) in order to make my cases work under my switch parameter however I am missing something.</p>
  
  <p>Please can someone assist pushing me into the right path.</p>
  
  <p>(I know i need to remove the negative case but I wanted to post the raw code incase I take something out or ammend something that is needed)</p>