Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x, y;
- cin >> x;
- for(int i = 0; i < x; i++)
- cout << "X";
- cout << endl << endl;
- cin >> y; cin >> x;
- for(int i = 0; i < x; i++)
- cout << "#";
- cout << endl;
- for(int i = 0; i < y - 2; i++)
- {
- cout << "#";
- for(int j = 0; j < x - 2; j++)
- cout << " ";
- if(x >= 2)
- cout << "#";
- cout << endl;
- }
- for(int i = 0; i < x; i++)
- cout << "#";
- cout << endl << endl;
- cin >> x;
- cout << "@" << endl;
- for(int i = 0; i < x - 2; i++)
- {
- cout << "@";
- for(int j = 0; j < i; j++)
- cout << " ";
- cout << "@" << endl;
- }
- for(int i = 0; i < x; i++)
- cout << "@";
- }
- Input:
- 15
- 5
- 12
- 6
- Output:
- XXXXXXXXXXXXXXX
- ############
- # #
- # #
- # #
- ############
- @
- @@
- @ @
- @ @
- @ @
- @@@@@@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement