Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117173 胡海峰老师 求最大值 C++ Compile Error 0 MS 0 KB 307 2025-04-13 20:50:38

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int n[10+3]; // a[0]不用!!!, a[1],a[2],a[3],-a[9],a[10] for (int i = 1;i <= 10;i++){ cin>>n[i]; } int max = 0; for (int i = 1;i <= 10;i++){ if (n[i] > max){ max = n[i]; } } cout<<max; return 0;


Run Info:

Main.cc: In function 'int main()':
Main.cc:21:10: error: expected '}' at end of input
  return 0;
          ^