Обновить main.cpp
This commit is contained in:
15
main.cpp
15
main.cpp
@@ -47,6 +47,7 @@ void z3() {
|
||||
|
||||
switch (choice) {
|
||||
case 1: {
|
||||
//3 стороны
|
||||
double length, width;
|
||||
cout << "Введите длину и ширину прямоугольника: ";
|
||||
cin >> length >> width;
|
||||
@@ -74,7 +75,7 @@ void z3() {
|
||||
|
||||
void z4() {
|
||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
//циклы
|
||||
SetConsoleTextAttribute(hConsole, 240);
|
||||
cout << " " << endl;
|
||||
SetConsoleTextAttribute(hConsole, 16);
|
||||
@@ -91,7 +92,7 @@ void z6() {
|
||||
string roman;
|
||||
cout << "Введите римское число: ";
|
||||
cin >> roman;
|
||||
|
||||
//правила
|
||||
int result = 0; // Итоговое значение
|
||||
int prevValue = 0; // Предыдущее значение для сравнения
|
||||
|
||||
@@ -128,7 +129,7 @@ void z6() {
|
||||
}
|
||||
void z2() {
|
||||
int number;
|
||||
|
||||
//0.9
|
||||
cout << "Введите число: ";
|
||||
cin >> number;
|
||||
|
||||
@@ -138,7 +139,7 @@ void z2() {
|
||||
}
|
||||
|
||||
int z1() {
|
||||
|
||||
// проверка букав
|
||||
|
||||
ofstream outFile("numbers.txt"); // Открываем файл для записи
|
||||
if (!outFile) {
|
||||
@@ -174,8 +175,8 @@ int z1() {
|
||||
cout << "Сумма чисел: " << sum << endl;
|
||||
}
|
||||
void z7() {
|
||||
int S1 = 1;
|
||||
int S2 = 1;
|
||||
int S1 = 0;
|
||||
int S2 = 0;
|
||||
|
||||
// Параметры для первого варианта
|
||||
int m1 = 37, i1 = 3, c1 = 64;
|
||||
@@ -184,7 +185,7 @@ void z7() {
|
||||
int m2 = 25173, i2 = 13849, c2 = 65537;
|
||||
|
||||
// Количество итераций
|
||||
int iterations = 10;
|
||||
int iterations = 100;
|
||||
|
||||
// Первый вариант
|
||||
cout << "Первый вариант (m = " << m1 << ", i = " << i1 << ", c = " << c1 << "):" << endl;
|
||||
|
||||
Reference in New Issue
Block a user