#include
using namespace std;
int main()
{
int n, P = 0, O = 0, N = 0, A;
cout << "n = ", cin >> n;
for(int i = 0; i < n; i++)
{
cin >> A;
if(A > 0) P++;
else if(A < 0) O++;
else N++;
}
cout <<"Chisla > 0: " << P;<br> cout <<"\nChisla < 0: " << O;<br> cout <<"\nChisla = 0: " << N;<br> return 0;
}
Пример работы программы:
n = 9
1 2 3 -4 -5 -6 -7 0 0
Chisla > 0: 3
Chisla < 0: 4
Chisla = 0: 2