#include <iostream> #include <iomanip> using namespace std; int main(int argc, char** argv) { int a[10][10],c,d; for(int i=1;i<=5;i++){ for(int j=0;j<5;j++){ cin>>a[i][j]; } } cin>>c>>d; for(int i=0;i<=5;i++){ swap(a[c][i],a[d][i]); } for(int i=1;i<=5;i++){ for(int j=0;j<5;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }
标签:std,10,int,交换,数组,include From: https://www.cnblogs.com/As10016/p/17455259.html