Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78941 李君彦666 数组输出 C++ Compile Error 0 MS 0 KB 238 2024-06-29 14:27:11

Tests(0/0):


Code:

#include<iostream> #include<cstdio> using namespace std; int main(){ int n,a[101] == {0}; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<=n;i++){ cout<<a[i]<<" "; } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:17: error: expected initializer before '==' token
    int n,a[101] == {0}; 
                 ^
Main.cc:8:13: error: 'a' was not declared in this scope
        cin>>a[i]; 
             ^
Main.cc:12:15: error: 'a' was not declared in this scope
         cout<