From c4caa7ddee7b9e236c029be4f327cac8badd56a4 Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 14 Nov 2024 21:37:01 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=208?= =?UTF-8?q?=20=D0=BB=D0=B0=D0=B1=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Main1/Main1.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/Main1/Main1.cpp b/Main1/Main1.cpp index f59eba7..514f3c7 100644 --- a/Main1/Main1.cpp +++ b/Main1/Main1.cpp @@ -4,9 +4,65 @@ void main() { int N = 0; int k = 0; int l = 0; - printf("privet mir"); + // елочка + void StClausAuto(HDC hdc, int x, int y) { + // верхний треугольник + MoveToEx(hdc, 20 + x, 0 + y, NULL); + LineTo(hdc, 30 + x, 20 + y); + LineTo(hdc, 10 + x, 20 + y); + LineTo(hdc, 20 + x, 0 + y); + // средний треугольник + MoveToEx(hdc, 20 + x, 10 + y, NULL); + LineTo(hdc, 30 + x, 40 + y); + LineTo(hdc, 10 + x, 40 + y); + LineTo(hdc, 20 + x, 10 + y); + + // нижний треугольник + MoveToEx(hdc, 20 + x, 30 + y, NULL); + LineTo(hdc, 40 + x, 80 + y); + LineTo(hdc, 0 + x, 80 + y); + LineTo(hdc, 20 + x, 30 + y); + } + + void StNabor1(HDC hdc) { + + StClausAuto(hdc, 0, 0); + StClausAuto(hdc, 200, 200); + StClausAuto(hdc, 100, 100); + StClausAuto(hdc, 0, 200); + StClausAuto(hdc, 200, 0); + + } + + void StNabor2(HDC hdc) { + int x = 60; + int y = 0; + + do { + StClausAuto(hdc, x, y); + x = x + 60; + } while (x <= 180 * 2); + + } + + void StNabor3(HDC hdc) { + int x = 60; + int y = 0; + + do { + StClausAuto(hdc, x, y); + y = y + 100; + } while (y <= 500); + + } + void StNabor4(HDC hdc) { + int y = 0; + int x = 0; + do { + StClausAuto(hdc, x, y); + x += 50; int me; // fvfr printf("fghjy");