72 lines
1.5 KiB
C++
72 lines
1.5 KiB
C++
#include <stdio.h>
|
|
#include <Windows.h>
|
|
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");
|
|
}
|
|
|
|
|