#include<bits/stdc++.h>
using namespace std;
short n,m,k,a[105][105],b[105][105],c[105][105],fx;
int main(){
cin>>n>>m>>k;
for(int i=0;i<n;++i){
for(int j=0;j<m;++j){
cin>>a[i][j];
}
}
for(int i=0;i<m;++i){
for(int j=0;j<k;++j){
cin>>b[i][j];
}
}
for(int i=0;i<n;++i){
fx=0;
for(int j=0;j<k;++j){
c[i][j]+=a[i][fx]+b[fx][j];
if(fx<m-1)
fx+=1;
}
}
for(int i=0;i<n;++i){
for(int j=0;j<k;++j){
cout<<c[i][j]<<' ';
}
cout<<endl;
}
return 0;
}
Why?Could you help me?Thank you for your help!