Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151909 王顺煜 18陶陶摘苹果 C++ Compile Error 0 MS 0 KB 235 2026-04-19 12:03:03

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n[11]x,s=0; for(int i=1;i<=n;i++){ cin>>a[i]; } cin>>x; for(int i=1;i<=10;i++){ if(m+30>=a[i])s++; } cout<<s; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:13: error: expected initializer before 'x'
    int n[11]x,s=0;
             ^
Main.cc:6:19: error: 'n' was not declared in this scope
    for(int i=1;i<=n;i++){
                   ^
Main.cc:7:10: error: 'a' was not declared in this scope
     cin>>a[i];
          ^
Main.cc:9:9: error: 'x' was not declared in this scope
    cin>>x;
         ^
Main.cc:11:8: error: 'm' was not declared in this scope
     if(m+30>=a[i])s++;
        ^
Main.cc:11:14: error: 'a' was not declared in this scope
     if(m+30>=a[i])s++;
              ^
Main.cc:11:19: error: 's' was not declared in this scope
     if(m+30>=a[i])s++;
                   ^
Main.cc:13:10: error: 's' was not declared in this scope
    cout<