arrow_forward
همه ارسالها
جزئیات ارسال کد#353
برای پسندیدن وارد شوید
1#include <bits/stdc++.h>
2
3using namespace std;
4
5int main() {
6 ios::sync_with_stdio(0);
7 cin.tie(0);
8
9 int n;
10 cin >> n;
11
12 for (int i = 0; i < n; ++i) {
13 for (int j = 0; j < n; ++j) {
14 if (i == 0 || j == 0 || i == n - 1 || j == n - 1 || i == j)
15 cout << "*";
16 else
17 cout << " ";
18 }
19 cout << "\n";
20 }
21}
کد ارسالشده برای داوری خودکار هاتکدز
UTF-8