title: c++ counting +ve, -ve and zeros from user's input
body: <p>I wanted to create a program that ask the user to input numbers. then the software will count how many positive, negative and zero numbers.</p>
  
  <p>Note that I must use calling function.</p>
  
  <p>This what I have done so far but still doesn't work properly</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  void counting(double, double);
  
  int main()
  {
      float count, P=0, i;
      cout&lt;&lt; "how many numbers you wanna enter?" &lt;&lt; endl;
      cin &gt;&gt; count;
      do {
  
          cout &lt;&lt; "enter your number: " &lt;&lt; endl;
          cin &gt;&gt; i;
  
          counting(count, i);
  
          P++;
      }
      while (P&lt;count);
  
      return 0;     
  }
  
  void counting(double count, double i)
  {
      int positive_Count = 0;
      int negative_Count = 0;
      int zero_Count     = 0;
      int u;
  
      for (u=0; u &lt;= count; u++)
      {
         if (i &gt; 0)
         {
            positive_Count++;
         }
         else if (i &lt; 0)
         {
            negative_Count++;
         }
         else if (i == 0)
         {
            zero_Count++;
         }  
      }
  
      cout  &lt;&lt; "Count of positive elements = " &lt;&lt; positive_Count &lt;&lt; endl
        &lt;&lt; "Count of negative elements = " &lt;&lt; negative_Count &lt;&lt; endl
        &lt;&lt; "Count of zero     elements = " &lt;&lt; zero_Count &lt;&lt; endl;
  }
  </code></pre>