提交时间:2024-05-12 18:15:06
运行 ID: 47191
#include<bits/stdc++.h> using namespace std; int main() { int n=0; while(cin>>n){ for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if((i==j)||(i+j==n+1)){ cout<<"x"; }else{ cout<<" "; } } cout<<endl; } cout<<endl; } return 0; }