Задали на практике нарисовать флаг на с++, я сколько пытался не получалось вот и пришлось просить помощи у профи то есть вас, буду благодарен каждому кто скинет код программы
#include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> int main() { initwindow(400,300); int poly[8] = { 100, 100, 250, 100, 250, 140, 100, 140 }; int colors[3] = {WHITE, GREEN, RED}; setcolor(BLACK); for (int i = 0; i < 3; ++i) { setfillstyle(1, colors); fillpoly(4, poly); poly[1] = poly[3] += 40; poly[5] = poly[7] += 40;} system("pause"); return 0; } C #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> int main() { initwindow(400,300); int poly[8] = { 100, 100, 250, 100, 250, 140, 100, 140 }; int colors[3] = {WHITE, GREEN, RED}; setcolor(BLACK); for (int i = 0; i < 3; ++i) { setfillstyle(1, colors); fillpoly(4, poly); poly[1] = poly[3] += 40; poly[5] = poly[7] += 40;} system("pause"); return 0; }