Archived
Работы по программированию
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user