e..
2025-07-13 17:35:00
发布于:四川
3阅读
0回复
0点赞
#include<iostream>
using namespace std;
int a[5][5]={0};
int main(){
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
cin>>a[i][j];
}
}int n,m;
cin>>n>>m;
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
if(i==n-1){
cout<<a[m-1][j]<<" ";
}else if(i==m-1){
cout<<a[n-1][j]<<" ";
}else{
cout<<a[i][j]<<" ";
}
}cout<<"\n";
}
return 0;
}
这里空空如也
有帮助,赞一个