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

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

verified
وضعیت داوری نهایی: پذیرفته شد
terminal
زبان برنامه‌نویسی: C++
schedule
ارسال‌کننده و زمان:
Saghar Nojavan (۳ سال پیش)
descriptionsolution.cpp ۲۳ خط • ۴۱۵ بایت
1#include <iostream>
2using namespace std;
3int main()
4{
5 int n;
6 cin >> n;
7 for (int i=0; i<n; i++)
8 {
9 for (int j=0; j<n; j++)
10 {
11 if (i==0 || i==n-1 || j==0 || j==n-1)
12 {
13 cout << "*";
14 }
15 else
16 {
17 cout << " ";
18 }
19 }
20 cout << endl;
21 }
22 return 0;
23}
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8