1 条题解

  • 0
    @ 2025-10-8 16:48:06

    scy视频

    #include <bits/stdc++.h>
    using namespace std;
    int a[11];
    /*
    定义11个整数的数组:a[0],a[1],a[2],…,a[10]。
    一般我们不习惯使用a[0],但又要使用到a[10],所以定义11个。
    */
    int main()
    {
        for (int i = 1; i <= 10; i++)
        {
            scanf("%d", &a[i]);
        }
        int x;
        scanf("%d", &x);
        int s = 0;
        for (int i = 1; i <= 10; i++)
        {
            if (a[i] >= x)
            {
                s = s + 1;
            }
        }
        printf("%d\n", s);
        return 0;
    }
    
    • 1

    *【C++语言:for+if】统计个数(视频)

    信息

    ID
    16
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    递交数
    1645
    已通过
    323
    上传者