Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- const int TABLE_SIZE = 8;
- int main() {
- printf("Size of the table: ");
- int unit;
- scanf("%d", &unit);
- const int real_size = unit * TABLE_SIZE;
- const int modulus = unit * 2;
- for (int row = 0; row < real_size; ++row) {
- for (int column = 0; column < real_size; ++column)
- if ((row % modulus < unit) ^ (column % modulus < unit))
- printf(".");
- else
- printf("X");
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement