Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- void main()
- {
- setlocale(LC_ALL, "Russian");
- int a;
- char ch = 223;
- //cout << "Enter size of chessboard: "; cin >> a;
- cout << "Введите размер доски: "; cin >> a;
- setlocale(LC_ALL, "C");
- for (int i = 0; i < a; i++, cout << endl) for (int j = 1; j < a + 1; j++) (((i + j) % 2) == 1) ? cout << ch << " " : cout << " ";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement