title: C++ ; Write a program that reads in ten whole numbers
body: <p>Write a program that reads in ten whole numbers and that outputs the sum of all the numbers greater than zero, the sum of all the numbers less than zero (which will be a negative or zero), and the sum of all the numbers, whether positive, negative, or zero. The user enters the ten numbers just once each and the user can enter them in any order. Your program should not ask the user to enter the positive numbers and the negative numbers separately. Now modify this program so that it outputs the sum of all positive numbers, the average of all positive numbers, the sum of all non-positive numbers, the average of all non-positive numbers, the sum of all positive and non-positive numbers, and the average of all numbers entered. </p>
  
  <p>This is what I have so far... </p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  int main ()
  {
       int number, negative_sum=0, positive_sum=0, sum=0, average_neg, 
           average_pos, average;
       int count=0, positiveCount=0, negativeCount=0; 
  
       cout &lt;&lt; "Please Input 10 whole numbers(Each number should be separated by space or Enter)\n";
       for(int i=0; i &lt; 10; i++)
       {
           cin &gt;&gt; number;
  
       if (number &gt;= 0 )
       {
           positive_sum += number;
           positiveCount++;  
       } 
       else     
       {
           negative_sum += number ; 
           negativeCount++; 
       } 
       }
  
       average_pos = positive_sum / positiveCount;
       average_neg = negative_sum / negativeCount; 
       sum = positive_sum + negative_sum;
       average = sum / count; 
  
       cout &lt;&lt; "The Total sum of Positive Numbers is " &lt;&lt; positive_sum &lt;&lt; " and the average of \nThe postive numbers entered is ";
       cout &lt;&lt; average_pos&lt;&lt; endl; 
       cout &lt;&lt; "The Total sum of Negative Numbers is " &lt;&lt; negative_sum &lt;&lt; " and the average of \nThe negative numbers entered is ";
       cout &lt;&lt; average_neg &lt;&lt; endl; 
       cout &lt;&lt; "The Total sum of numbers entered is " &lt;&lt; sum &lt;&lt; " and its average is "&lt;&lt; average &lt;&lt; endl;
  
       system("PAUSE");
       return 0;
  }
  </code></pre>
  
  <p>Basically it is just printing the "Please Input 10 whole numbers(Each number should be separated by space or Enter)\n" part multiple times after I entered numbers.  </p>