Run ID:81914
提交时间:2024-07-12 16:10:59
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { bool cd1 = (i == j); bool cd2 = (j == (N - i - 1)); if (cd1 || cd2) cout << '+'; else cout << '-'; } cout << endl; } }