arrow_forward
همه ارسالها
جزئیات ارسال کد#624
برای پسندیدن وارد شوید
1// meow.cpp : This file contains the 'main' function. Program execution begins and ends there.
2//
3
4#include <iostream>
5
6using namespace std;
7
8int main()
9{
10 int n;
11 cin >> n;
12 int a = 0;
13
14 while (n > a)
15 {
16 cout << "*";
17 a++;
18 }
19 cout << "\n";
20
21 a = 0;
22 int b = n - 2;
23 int c = 0;
24 while (b > c)
25 {
26 cout << "*";
27 while (n - 2 > a)
28 {
29 cout << " ";
30 a++;
31 }
32 a = 0;
33 cout << "*";
34 cout << "\n";
35 b--;
36 }
37 a = 0;
38 while (n > a)
39 {
40 cout << "*";
41 a++;
42 }
43
44
45
46
47 return 0;
48}
کد ارسالشده برای داوری خودکار هاتکدز
UTF-8