Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160915 鸡哥 18陶陶摘苹果 C++ Compile Error 0 MS 0 KB 220 2026-09-26 16:39:34

Tests(0/0):


Code:

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


Run Info:

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