Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136581 杜禹轩 找最大的数 C++ Compile Error 0 MS 0 KB 272 2025-11-15 14:19:52

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:3: error: 'x' was not declared in this scope
   x=1;
   ^
Main.cc:19:8: error: 'i' was not declared in this scope
  cout>>i;
        ^
Main.cc:7:10: warning: unused variable 'n' [-Wunused-variable]
  int s=0,n;
          ^