Run ID:63594

提交时间:2024-01-19 10:49:07

#include <bits/stdc++.h>. using namespace std; int main (){ int n,m; int a[101][101]; for(int i = 0;i<n;i++){ for(int j = 0;j<n;j++){ cin >> a[i][j]; } } for(int i = 0;i<n;i++){ for(int j = 0;j<n;j++){ if(i == j or i + j == n - 1){ a[i][j] += m; cout<<a[i][j]<<" "; }else{ cout<<a[i][j]<<" "; } } } return 0; }