arrow_forward همه ارسال‌ها

جزئیات ارسال کد#92

verified
وضعیت داوری نهایی: پذیرفته شد
terminal
زبان برنامه‌نویسی: C++
schedule
ارسال‌کننده و زمان:
sina pourmahdi (۳ سال پیش)
descriptionsolution.cpp ۲۸ خط • ۳۴۰ بایت
1#include<iostream>
2using namespace std;
3int main()
4{
5 int n;
6 cin >> n;
7
8 for (int i = 0; i < n; i++)
9 {
10
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 }
18 else
19 {
20 cout << " ";
21 }
22 }
23 cout << endl;
24
25
26 }
27 return 0;
28}
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8