From a3b00e15e2411b5fa64c9e295523ba5e9e60a94a Mon Sep 17 00:00:00 2001 From: Arity-T Date: Tue, 3 Dec 2024 19:06:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BE=D1=87=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab1/lab1.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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