您当前处于兼容模式。某些功能在此模式下不可用。我们强烈建议在现代浏览器上切换为标准模式以获得更好的体验。 标准模式 隐藏

#include<bits/stdc++.h> using namespace std; int main() { int n; 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; } return 0; }

0 条评论

目前还没有评论...

信息

ID
260
时间
ms
内存
MiB
难度
6
标签
递交数
38
已通过
13
上传者