C++乾坤大挪移问题_#include

#include <iostream>
using namespace std;

int main(){
	int a[10][10];
	for (int i = 0;i < 5;i ++){
		for (int j = 0;j < 5;j ++){
			cin >> a[i][j];
		}
	}
	for (int i = 0;i < 5;i ++){
		for (int j = 4;j > 0;j --){
			swap(a[i][j],a[i][j - 1]);
		}
	} 
	for (int i = 0;i < 5;i ++){
		for (int j = 0;j < 4;j ++){
			cout << a[i][j] << " ";
		}
		cout << endl;
	}
	return 0;
}