hdoj2008

来源:互联网 发布:pcb绘图软件中文版 编辑:程序博客网 时间:2024/06/06 00:24
 #include<iostream>//#include<cmath>using namespace std;int main(){    int n,c1,c2,c3;    double x;    while( cin >> n && n != 0)    {           c1 = c2 = c3 = 0;           for( int i = 0;i < n;i ++)           {           cin >> x;           if( x < 0)           {               c1 ++;               }               else if(x > 0)               {                    c3 ++;                    }                    else c2 ++;               }               cout << c1 <<" " << c2 <<" " << c3 << endl;           }    system("pause");    }

原创粉丝点击