2008 數值統計
阿新 • • 發佈:2019-04-16
return scanf color pro 技術 img num warn war
http://acm.hdu.edu.cn/showproblem.php?pid=2008
#pragma warning(disable:4996) #include<stdio.h> int main() { int n; double num; int a, b, c; while (scanf("%d ", &n),n ) { a = b = c = 0; for (int i = 0; i < n; i++) { scanf("%lf", &num); if (num < 0) a++; else if (num > 0) c++; else b++; } printf("%d %d %d\n", a ,b,c); } return 0; }
2008 數值統計