Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123640 王梓轩 找最大的数 C++ Compile Error 0 MS 0 KB 300 2025-07-08 11:26:57

Tests(0/0):


Code:

#include<istream> using namespace std; int main() { int max=0,x,a[15] for(int i=1;i<=10;i++) { cin>>a[i]; } for(int i=1;i<=10;i++) { if(a[i]=max) { max=a[i]; z=i; } } cout<<z; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:5: error: expected initializer before 'for'
     for(int i=1;i<=10;i++)
     ^
Main.cc:6:17: error: 'i' was not declared in this scope
     for(int i=1;i<=10;i++)
                 ^
Main.cc:12:12: error: 'a' was not declared in this scope
         if(a[i]=max)
            ^
Main.cc:15:13: error: 'z' was not declared in this scope
             z=i;
             ^
Main.cc:18:5: error: 'cout' was not declared in this scope
     cout<