数组
统计数据正负个数
http://www.nowcoder.com/questionTerminal/3f33889582934a09b4e3ddd3cc976226
include<bits/stdc++.h>
using namespace std;
int a[45];
int main()
{
int f = 0, z = 0;
for(int i = 1; i <= 10; i++)
{
cin >> a[i];
}
for(int i = 1; i <= 10; i++)
{
if(a[i] < 0) f++;
if(a[i] > 0) z++;
}
cout << "positive:" << z << endl;
cout << "negative:" << f << endl;
return 0;
}