Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int r, c;
- cin >> r >> c;
- for (int i = 0; i < r * 2 + 1; i++)
- {
- for (int j = 0; j < c * 2 + 1; j++)
- {
- if ((i == 0 or i == 1) and (j == 1 or j == 0))
- {
- cout << ".";
- }
- else if (i % 2 == 0)
- cout << (j % 2 ? '-' : '+');
- else
- cout << (j % 2 ? '.' : '|');
- }
- cout << '\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment