Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. void kula(int N, int M)
  2. {
  3. char tab[((6 + 2 * M) * N - 1)][((6 + 2 * M) * N + 1)];
  4. for (int i = 0; i < ((6 + 2 * M) * N - 1); i++)
  5. {
  6. for (int j = 0; j < ((6 + 2 * M) * N + 1); j++)
  7. {
  8. tab[i][j] = '*';
  9. }
  10. }
  11. tab[(((6 + 2 * M) * N - 2) / 2)][(((6 + 2 * M) * N) / 2)] = 'X';
  12. for (int i = 0; i < ((6 + 2 * M) * N - 1); i++)
  13. {
  14. for (int j = 0; j < ((6 + 2 * M) * N + 1); j++)
  15. {
  16. cout << tab[i][j];
  17. }
  18. cout << endl;
  19. }
  20. return;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement