Archived
25 lines
461 B
C++
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;
|
|
}
|
|
|