Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154395 汪义罗 矩阵加法 C++ Compile Error 0 MS 0 KB 318 2026-05-30 13:45:56

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a[100][100; int n,m; cin>>n>>m; //输入 for(int 1;i<=n;i++){ for(int j=i;j<=n;j++){ cin>>a[i][j]; } } //输出 for(int 1;i<=n;i++){ for(int j=i;j<=n;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:16: error: expected ']' before ';' token
  int a[100][100;
                ^
Main.cc:9:10: error: expected unqualified-id before numeric constant
  for(int 1;i<=n;i++){
          ^
Main.cc:9:10: error: expected ';' before numeric constant
Main.cc:9:12: error: 'i' was not declared in this scope
  for(int 1;i<=n;i++){
            ^
Main.cc:9:16: error: expected ')' before ';' token
  for(int 1;i<=n;i++){
                ^
Main.cc:9:17: error: 'i' was not declared in this scope
  for(int 1;i<=n;i++){
                 ^
Main.cc:16:10: error: expected unqualified-id before numeric constant
  for(int 1;i<=n;i++){
          ^
Main.cc:16:10: error: expected ';' before numeric constant
Main.cc:16:16: error: expected ')' before ';' token
  for(int 1;i<=n;i++){
                ^