diff --git a/flag_for_emin.cpp b/flag_for_emin.cpp new file mode 100644 index 0000000..17c6e72 --- /dev/null +++ b/flag_for_emin.cpp @@ -0,0 +1,25 @@ +void z4() { + HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + + const int width = 20; // Ширина флага + const int height = 10; // Высота флага + const int centerX = width / 2; + const int centerY = height / 2; + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + // Определяем, находится ли точка (x, y) внутри круга + int dx = x - centerX; + int dy = y - centerY; + if (dx * dx + dy * dy <= circleRadius * circleRadius) { + + } + else { + SetConsoleTextAttribute(hConsole, 0xf0); // Белый цвет + } + cout << " "; // Два пробела для более широкого изображения + } + cout << endl; + } + SetConsoleTextAttribute(hConsole, 15); // Сбрасываем цвет на белый +} \ No newline at end of file