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