Обновить main.cpp

This commit is contained in:
oltnd
2024-10-26 18:18:49 +03:00
parent 9b1db9b4bc
commit f0236b4504

View File

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