#include #include #include using namespace std; void base(int A[9][9]) { int B[9][9]={ {1, 3, 9, 7, 6, 8, 5, 2, 4}, {8, 4, 5, 1, 3, 2, 9, 7, 6}, {2, 6, 7, 9, 4, 5, 8, 3, 1}, {5, 1, 3, 2, 7, 6, 4, 8, 9}, {6, 7, 2, 8, 9, 4, 1, 5, 3}, {4, 9, 8, 5, 1, 3, 2, 6, 7}, {7, 2, 6, 4, 5, 1, 3, 9, 8}, {9, 5, 1, 3, 8, 7, 6, 4, 2}, {3, 8, 4, 6, 2, 9, 7, 1, 5}}; for(int i=0; i<9; i++) for(int j=0; j<9; j++) A[i][j]=B[i][j]; } void output(int A[9][9]) { cout<> k_str; int k = atoi(k_str.c_str()); for(int i=0; i> "; cin >> in_line; if (in_line == "Y") { return true; } if (in_line == "N") { return false; } } } int main() { int A[9][9]; base(A); bool want_to_continue = true; while (want_to_continue) { system("clear"); generate_sudoku(A); want_to_continue = ask_to_continue(); } system("clear"); cout<<"\nÇàâåðøåíèå ðàáîòû...\n\n"; system("pause"); }