+ 2
Write a program to take 10 numbers from the user and count all even , odd, +ve,and -ve numbers in C++ language
please do it
5 ответов
+ 7
what is +ve and -ve numbers?
+ 7
int even = 0, odd = 0, positive = 0, negative = 0;
int array[10];
for(int i = 0; i < 10;i++)
{
cin >> array[i];
if(array[i] % 2 == 0)
++even;
else
++odd;
if(array[i] > 0)
++positive;
else
++negative;
}
cout << even << odd << positive << negative;
+ 2
Anyone....
+ 2
please help me to make this program
+ 1
what for positive and negative number