[恢]hdu 2008

2011-12-12 05:01:03

地址:http://acm.hdu.edu.cn/showproblem.php?pid=2008

题意:中文题。

代码:

# include <stdio.h>


int main ()
{
int n, a, b, c ;
double num ;
while (~scanf ("%d", &n) && n)
{
a = b = c = 0 ;
while (n--){
scanf ("%lf", &num) ;
num < 0 ? a ++ : num==0 ? b++ : c++ ;
}
printf ("%d %d %d\n", a, b, c) ;
}
return 0 ;
}



posted @ 2012-01-06 14:19  Seraph2012  阅读(133)  评论(0编辑  收藏  举报