Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
124126 罗锦墨 找最大的数 C++ Compile Error 0 MS 0 KB 245 2025-07-11 09:49:23

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int a[101];//数组 的定义 int main() { //数组的输入 for(int i=1;i<=n;i++ ){ cin>>a[i]; } //数组的输出 for(int i=n;i>=1;i-- ){ cout<<a[i]<<" "; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:17: error: 'n' was not declared in this scope
  for(int i=1;i<=n;i++ ){
                 ^
Main.cc:10:12: error: 'n' was not declared in this scope
  for(int i=n;i>=1;i-- ){
            ^