Archived
Работы по программированию
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include <graphics.h>
|
||||
#include <iostream>
|
||||
|
||||
void plotInequality() {
|
||||
for (int x = -10; x <= 10; x++) {
|
||||
if (4 * x - x * x <= 0) {
|
||||
putpixel(300 + x * 10, 300 - (4 * x - x * x) * 10, WHITE);
|
||||
} else {
|
||||
putpixel(300 + x * 10, 300 - (4 * x - x * x) * 10, WHITE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
int gd = DETECT, gm;
|
||||
initgraph(&gd, &gm, "");
|
||||
|
||||
plotInequality();
|
||||
|
||||
getch();
|
||||
closegraph();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user