题解
2025-09-01 20:04:44
发布于:四川
4阅读
0回复
0点赞
也不知道为啥要俩数组,第二个数组直接按变量形式输入,然后就直接输出
#include<bits/stdc++.h>
using namespace std;
int a[110][110];
int main(){
int 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++){
int x;
cin>>x;
cout<<a[i][j]+x<<" ";
}
cout<<endl;
}
return 0;
}
全部评论 1
有人用吗,这么简单的题应该不需要
2025-10-09 来自 四川
0



有帮助,赞一个