Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
47105 zhangrongbao2023 【例38.3】 X战警 C++ No Test Data 0 MS 0 KB 341 2024-05-12 14:59:03

Tests(0/0):


#include<iostream> using namespace std; int main() { int n=0; while(cin>>n) //表示多组输入 { for(int i=1;i<=n;i++) //i为行 { for (int j=1;j<=n;j++) //j为列 { if((i==j)||(i+j==n+1)) { cout<<"x"; } else { cout<<" "; } } cout<<endl; } cout<<endl; } }