Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- string repeat(string s, int n) {
- string result;
- for (int i = 0; i < n; i++)
- result += s;
- return result;
- }
- int main() {
- int n;
- cin >> n;
- printf("%s|", repeat(".", n - 1).c_str());
- for (int i = 0; i < n; i++){
- cout << "\\/";
- }
- printf("|%s\n", repeat(".", n - 1).c_str());
- printf("%s|", repeat(".", n - 1).c_str());
- for (int i = 1; i <= 2 * n; i++){
- cout << "~";
- }
- printf("|%s\n", repeat(".", n - 1).c_str());
- for (int i = 1; i <= n; i++) {
- printf("%s|%s", repeat(".", n - 1).c_str(), repeat(" ", i - 1).c_str());
- for (int j = n; j >= i; j--){
- cout << "{}";
- }
- printf("%s|%s\n", repeat(" ", i - 1).c_str(), repeat(".", n - 1).c_str());
- }
- printf("%s%s%sMEOW%s%s%s\n", repeat(".", n - 1).c_str(), "|", repeat(" ", n - 2).c_str(), repeat(" ", n - 2).c_str(), "|", repeat(".", n - 1).c_str());
- printf("%s%s%sFOOD%s%s%s\n", repeat(".", n - 1).c_str(), "|", repeat(" ", n - 2).c_str(), repeat(" ", n - 2).c_str(), "|", repeat(".", n - 1).c_str());
- for (int i = 1; i <= n; i++) {
- printf("%s|%s", repeat(".", n - 1).c_str(), repeat(" ", n - i).c_str());
- for (int j = 1; j <= i; j++) {
- cout << "{}";
- }
- printf("%s|%s\n", repeat(" ", n - i).c_str(), repeat(".", n - 1).c_str());
- }
- printf("%s|", repeat(".", n - 1).c_str());
- for (int i = 1; i <= 2 * n; i++) {
- cout << "~";
- }
- printf("|%s\n", repeat(".", n - 1).c_str());
- printf("%s|", repeat(".", n - 1).c_str());
- for (int i = 0; i < n; i++) {
- cout << "\\/";
- }
- printf("|%s", repeat(".", n - 1).c_str());
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement