Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- // Pin
- string r(string s, int n)
- {
- string answer;
- for (int i = 0; i < n; i++)
- {
- answer = answer + s;
- }
- return answer;
- }
- int main()
- {
- int n;
- cin >> n;
- cout << "/`" << r("P", 2 * n) << r(" ", n) << "/`" << "I" << r(" ", n) << "/`" << "N" << r(" ", 2 * n + 1) << "N\n";
- int j = 0;
- for (int i = 1; i <= n - 1; i++, j++)
- {
- cout << "| P" << r(" ", 2 * n - 2) << "P" << r(" ", n) << "| I" << r(" ", n) << "| N" << r(" ", j) << "N" <<
- r(" ", 2 * n - j) << "N" << endl;
- }
- cout << "| " << r("P", 2 * n) << r(" ", n) << "| " << "I" << r(" ", n) << "| " << "N" << r(" ", j) << "N" <<
- r(" ", 2 * n - j) << "N" << endl;
- j++;
- for (int i = 0; i < n; i++, j++)
- {
- cout << "| " << r("P", n / 2) << r(" ", 3 * n - n / 2) << "| I" << r(" ", n) << "| N" << r(" ", j) << "N" <<
- r(" ", 2 * n - j) << "N" << endl;
- }
- cout << "\\_" << r("P", n / 2) << r(" ", 3 * n - n / 2) << "\\_I" << r(" ", n) << "\\_N" << r(" ", j) << "N" <<
- r(" ", 2 * n - j) << "N" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement