Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
63740 张江鹏 矩阵加法 C++ Compile Error 0 MS 0 KB 485 2024-01-19 17:30:00

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[101][101],b[101][101],e=0; int min=2e9,n,m; cin>>n>>m; for(int i=1;i<n;i++){ for(int j=1;j<m;j++){ cin>>a[i][j]; } } for(int i=1;i<n;i++){ for(int j=1;j<m;j++){ cin>>b[i][j]; } } for(int i=1;i<n;i++){ for(int j=1;j<m;j++){ c[i][j]=a[i][j]+b[i][j]; } } for(int i=1;i<n;i++){ for(int j=1;j<m;j++){ cout<<c[i][j]; } cout<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:19:4: error: 'c' was not declared in this scope
    c[i][j]=a[i][j]+b[i][j];
    ^
Main.cc:25:9: error: 'c' was not declared in this scope
   cout<