Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "rus");
- char a[8][8] = { 0 };
- for (int i = 0; i < 8; i++)
- for (int j = 0; j < 8; j++)
- a[i][j] = '*';
- a[6][4] = 'p';
- char b[4] = { 0 };
- for (int i = 0; i < 8; i++)
- {
- cout << endl;
- for (int j = 0; j < 8; j++) cout << a[i][j];
- }
- cout << endl << endl;
- while (cin >> b)
- {
- a[56 - b[4]][b[3] - 97] = a[56 - b[1]][b[0] - 97];
- a[56 - b[1]][b[0] - 97] = '*';
- for (int i = 0; i < 8; i++)
- {
- cout << endl;
- for (int j = 0; j < 8; j++) cout << a[i][j];
- }
- cout << endl << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement