This is my HW question:
Write a program that will ask the user to input 10 non-negative numbers. Your program should reject the number if it is negative, and make the user type a non-negative number. Your program should then compute and report the following statistics about the numbers entered: sum of the numbers, average of the numbers, # of odd numbers entered, # of even numbers entered.
I need help getting the total number of odd and even numbers this is what I have ...help please?
I Greatly Appreciate Your Help =]
Using namespace std;
int main ()
cout << “Input ten non-negative numbers: ”
cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j;
if ( a,b,c,d,e,f,g,h,i,j % 2 == 0 )
cin>> odd<< endl;
cout <<sum<<" " <<avg<< " "<<odd << " "<<even;
else (a,b,c,d,e,f,g,h,i,j <0)
cout << "You entered a negative number! ";