zoukankan      html  css  js  c++  java
  • 2008 数值统计

    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
    ", a ,b,c);
        }
        return 0;
    }
  • 相关阅读:
    Linux
    Other
    Linux
    VIM
    Linux
    其他
    Win10
    Win10
    IDE
    其他
  • 原文地址:https://www.cnblogs.com/CheeseIce/p/10717061.html
Copyright © 2011-2022 走看看