Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include <stdlib.h>
- #include <math.h>
- #include <conio.h>
- #include <stdio.h>
- void main()
- {
- double x;
- printf(" y\n");
- for (int j = 0; j < 5; j++)
- {
- printf("\n");
- }
- printf(" x\n");
- for (int j = 0; j < 7; j++)
- {
- printf("\n");
- }
- HDC hDC = GetDC(GetConsoleWindow());
- HPEN Pen = CreatePen(PS_SOLID, 2, RGB(255, 255, 255));
- HPEN PenF1 = CreatePen(PS_SOLID, 4, RGB(204, 123, 31));
- HPEN PenF2 = CreatePen(PS_SOLID, 4, RGB(150, 29, 138));
- SelectObject(hDC, Pen);
- MoveToEx(hDC, 0, 85, NULL);
- LineTo(hDC, 200, 85);
- MoveToEx(hDC, 100, 0, NULL);
- LineTo(hDC, 100, 170);
- SelectObject(hDC, PenF1);
- for (x = -1; x <=3; x += 0.0001)
- {
- MoveToEx(hDC, 20 * x + 100, -20 * (pow(2.0,-x)/100) + 85, NULL);
- LineTo(hDC, 20 * x + 100, -20 * (pow(2.0,-x)/100) + 85);
- }
- SelectObject(hDC, PenF2);
- for (x = -1; x <=3; x += 0.0001)
- {
- MoveToEx(hDC, 20 * x + 100, -20 * (20/(1+x*x)) + 85, NULL);
- LineTo(hDC, 20 * x + 100, -20 * (20/(1+x*x)) + 85);
- }
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement