Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
80067 赵文浚 找最大的数 C++ Compile Error 0 MS 0 KB 248 2024-07-11 10:55:59

Tests(0/0):


Code:

#include<iostream> using namespace std; int main() { int a[11]; int max,b; for (int i=1;i<=10;i++) { cin>>a[i]; } max=a[1]; b=1 for (int j=2;j<=10;j++) { if (a[j]>max) { max=a[j] b=j; } } cout<<b; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:2: error: expected ';' before 'for'
  for (int j=2;j<=10;j++)
  ^
Main.cc:13:15: error: 'j' was not declared in this scope
  for (int j=2;j<=10;j++)
               ^