This repository has been archived on 2026-07-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
college-work/Задания по C и C++/с (2024)/С(2024)/15.cpp
T

25 lines
461 B
C++

#include <iostream>
#include <graphics.h>
#include <cmath>
using namespace std;
int main() {
int gd = DETECT, gm;
initgraph(&gd, &gm, "");
line(100, 400, 400, 400);
line(100, 400, 100, 100);
for (int x = 100; x <= 400; x++) {
double y = abs(x - 100) * (x - 100) / 100 + abs(x - 100) / 100 - 3 * (x - 100) / 100 + 400;
putpixel(x, y, GREEN);
}
getch();
closegraph();
return 0;
}