Archived
24 lines
479 B
C++
24 lines
479 B
C++
#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;
|
|
}
|