Мелочи
This commit is contained in:
@@ -14,7 +14,6 @@ int main()
|
|||||||
setlocale(LC_ALL, "Russian");
|
setlocale(LC_ALL, "Russian");
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
skipIter:
|
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
cout << "Выберите способ вычисления функции:\n"
|
cout << "Выберите способ вычисления функции:\n"
|
||||||
@@ -28,7 +27,7 @@ int main()
|
|||||||
if (actionId == 1) {
|
if (actionId == 1) {
|
||||||
cout << "Выйти из программы? (yes/no)\n";
|
cout << "Выйти из программы? (yes/no)\n";
|
||||||
if (userApprove()) return 0;
|
if (userApprove()) return 0;
|
||||||
goto skipIter;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "Укажите ширину поля (min 1): ";
|
cout << "Укажите ширину поля (min 1): ";
|
||||||
@@ -46,16 +45,17 @@ int main()
|
|||||||
CellularAutomaton ca(fieldWidth, fieldHeight, fillWithRandom);
|
CellularAutomaton ca(fieldWidth, fieldHeight, fillWithRandom);
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
std::cout << "\nИтерация 0:\n";
|
cout << "\nИтерация 0:\n";
|
||||||
ca.displayField();
|
ca.displayField();
|
||||||
|
|
||||||
for (int i = 0; i < iterationsCount; ++i)
|
for (int i = 0; i < iterationsCount; ++i)
|
||||||
{
|
{
|
||||||
std::cout << "\nИтерация " << i + 1 << ":\n";
|
cout << "\nИтерация " << i + 1 << ":\n";
|
||||||
ca.update();
|
ca.update();
|
||||||
ca.displayField();
|
ca.displayField();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cout << "Нажмите на enter, чтобы продолжить...";
|
||||||
waitForEnter();
|
waitForEnter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user