diff --git a/lab1/lab1.cpp b/lab1/lab1.cpp index 705fa7b..4d7536b 100644 --- a/lab1/lab1.cpp +++ b/lab1/lab1.cpp @@ -14,7 +14,6 @@ int main() setlocale(LC_ALL, "Russian"); while (true) { - skipIter: clear(); cout << "Выберите способ вычисления функции:\n" @@ -28,7 +27,7 @@ int main() if (actionId == 1) { cout << "Выйти из программы? (yes/no)\n"; if (userApprove()) return 0; - goto skipIter; + break; } cout << "Укажите ширину поля (min 1): "; @@ -46,16 +45,17 @@ int main() CellularAutomaton ca(fieldWidth, fieldHeight, fillWithRandom); clear(); - std::cout << "\nИтерация 0:\n"; + cout << "\nИтерация 0:\n"; ca.displayField(); for (int i = 0; i < iterationsCount; ++i) { - std::cout << "\nИтерация " << i + 1 << ":\n"; + cout << "\nИтерация " << i + 1 << ":\n"; ca.update(); ca.displayField(); } + cout << "Нажмите на enter, чтобы продолжить..."; waitForEnter(); } } \ No newline at end of file