-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdallor.cpp
More file actions
66 lines (59 loc) · 1.13 KB
/
Copy pathdallor.cpp
File metadata and controls
66 lines (59 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include <iostream>
#include <string>
using namespace std;
unsigned char w = 24;
string s = "$";
string n = "\n";
string c = " ";
string g (unsigned char& w, string& buff) {
unsigned char t = w / 2 - buff.length () / 2;
string y = "";
for (unsigned char e = 0; e < t; e++)
{
y += c;
}
return s + y + buff + y + s + n;
}
string a ()
{
string f = "";
for (unsigned char i = 0; i < w; i++)
{
f += s;
}
return s + n;
}
string z ()
{
string innerText = "";
string p = c + s + s + s + c;
for (unsigned char o = 0; o < 2; o++)
{
string j = o ? c : s;
string k = o ? s : c;
for (unsigned char q = o ? 0 : 4; o ? q < 4 : q >= 0; o ? q++ : q--){
string buff = "";
switch (q){
case 0:
buff = c + c + s + c + c;
break;
case 1:
buff = p;
break;
case 2:
case 3:
buff = j + c + s + c + k;
break;
}
innerText += g(w, buff);
}
innerText += o ? g(w, p) : "";
}
return innerText;
}
int main ()
{
string b = a ();
cout << n + b + z() + b;
return 0;
}