Где в проверке на выигрыш ошибка. да и так где есть ошибки ? include include include include include using namespace std; using namespace std; char table[3][3]; char name1[30]; char name2[30]; bool step; bool input() { for (int i(0); i< 3; i++) { for (int j(0); j< 3; j++) { cout < < "|" < < table[i][j] < < ' '; } cout < < '|'; cout < < endl; } if (step) cout < < "ходит " < < name1 < < " : "; else cout < < "ходит " < < name2 < < " : "; int n; cin > > n; if (n< 1 || n> 9) return false; int i, j; if (n % 3 == 0) { i = n / 3 - 1; j = 2; } else { j = n % 3 - 1; i = n / 3; } if (table[i][j] == 'o' || table[i][j] == 'x') return false; if (step) { table[i][j] = 'x'; step = false; } else { table[i][j] = 'o'; step = true; } return true; } bool win() { for (int i(0); i< 3; i++) if ((table[i][0] == table[i][1]) & & (table[i][0] == table[i][2])) return true; else { for (int j(0); j < 3; j++) { if ((table[i][j] == table[1][i]) & & (table[i][j] == table[2][i])) return true; } } if ((table[0][0] == table[1][1] & & table[0][0] == table[2][2]) || (table[0][2] == table[1][1] & & table[0][2] == table[2][0])) return true; return false; } int main() { setlocale(lc_all, "rus"); cout < < "\t\t*** крестики нолики ***\n\n"; cout < < "правила\n"; cout < < "играют два игрока на поле 3х3\n"; cout < < "побеждает тот кто составит выигрышную комбинацию"; cout < < "вид поля\n\n"; int l = 0; for (int i(0); i< 3; i++) { for (int j(0); j< 3; j++) { cout < < "|" < < l + 1 < < ' '; table[i][j] = char(49 + l); l++; } cout < < "|"; cout < < endl; } cout < < "\nдля хода нажмите на цифру ячейки поля\n"; cout < < "для начала игры нажмите клавишу"; int i = 0; cout < < "ведите имя 1 игрока за x: "; cin.getline(name1, 30); cout < < "ведите имя 2 игрока за 0: "; cin.getline(name2, 30); while (! { if (i == 9 & & ! ( { cout < < " \n"; return -1; } system("cls"); if (! { cout < < "вы вели неверные данные! "; } else i++; } system("cls"); if (step) cout < < "победил " < < name2 < < endl; else cout < < "победил " < < name1 < < endl;