Advertisement
krasio12356

Marguerita

Apr 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.                                       // Marguerita
  5. string r(string s, int n)
  6. {
  7.     string answer;
  8.     for (int i = 0; i < n; i++)
  9.     {
  10.         answer = answer + s;
  11.     }
  12.     return answer;
  13. }
  14.  
  15.  
  16. int main()
  17. {
  18.     int n;
  19.     cin >> n;
  20.     int w = 8 * n + 2;
  21.     cout << "'&$" << r("'", 8 * n - 1) << endl;
  22.     for (int i = 2, j = 8 * n - 1; i <= n; i++, j--)
  23.     {
  24.         cout << r("'", i) << "\\" << r("'", j) << endl;
  25.     }
  26.     cout << r("^*", 4 * n) << "^'" << endl;
  27.     for (int i = 0, j = w - n - 6; i <= n - 2; i++, j = j - 2)
  28.     {
  29.         cout << r("'", i) << "\\\\" << r(" ", n) << "\\" << r(" ", j) << "//" << r("'", i + 1) << endl;
  30.     }
  31.     cout << r("'", n - 1) << "\\" << r("~", w - 2 * n - 1) << "/" << r("'", n) << endl;
  32.     int i = 0;
  33.     int j = w - 2 * n - 3;
  34.     for (; i < n - 2; i++, j = j - 2)
  35.     {
  36.         cout << r("'", i + n) << "\\" << r(" ", j) << "/" << r("'", i + n + 1) << endl;
  37.     }
  38.     cout << r("'", i + n) << "\\" << r("_", j) << "/" << r("'", i + n + 1) << endl;
  39.     i++;
  40.     j = j - 2;
  41.     cout << r("'", i + n) << "\\" << r(".", j) << "/" << r("'", i + n + 1) << endl;
  42.     i++;
  43.     j = j - 2;
  44.     for (; j >= 5; i++, j = j - 2)
  45.     {
  46.         cout << r("'", i + n) << "\\" << r(" ", j) << "/" << r("'", i + n + 1) << endl;
  47.     }
  48.     cout << r("'", (w - 5) / 2) << "\\___/" << r("'", (w - 5) / 2 + 1) << endl;
  49.     for (int k = 0; k < 2 * n + 1; k++)
  50.     {
  51.         cout << r("'", (w - 3) / 2) << "|||" << r("'", (w - 3) / 2 + 1) << endl;
  52.     }
  53.     cout << r("_", w - 1) << "'" << endl;
  54.     cout << "'" << r("-", w - 3) << "''" << endl;
  55.     return 0;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement