题解
2025-01-07 21:38:07
发布于:江苏
3阅读
0回复
0点赞
#include<iostream>
using namespace std;
int main(){
int n,m,a[10][10];
for(int i=1;i<=5;i++){
for(int j=1;j<=5;j++){
cin>>a[i][j];
}
}
cin>>n>>m;
for(int i=1;i<=5;i++){
for(int j=1;j<=5;j++){
if(i==n){
cout<<a[m][j]<<' ';
}else if(i==m){
cout<<a[n][j]<<' ';
}else{
cout<<a[i][j]<<' ';
}
}
cout<<"\n";
}
return 0;
}
这里空空如也
有帮助,赞一个