-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
65 lines (50 loc) · 971 Bytes
/
main.cpp
File metadata and controls
65 lines (50 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include <iostream>
#include <cmath>
#include "conyo.h"
using namespace std;
using namespace cy;
void drawcircle(int x0, int y0, int radius, char c)
{
int x = radius;
int y = 0;
int err = 0;
while (x >= y)
{
cursorSetPos(x0 + x, y0 + y);
cout << c;
cursorSetPos(x0 + y, y0 + x);
cout << c;
cursorSetPos(x0 - y, y0 + x);
cout << c;
cursorSetPos(x0 - x, y0 + y);
cout << c;
cursorSetPos(x0 - x, y0 - y);
cout << c;
cursorSetPos(x0 - y, y0 - x);
cout << c;
cursorSetPos(x0 + y, y0 - x);
cout << c;
cursorSetPos(x0 + x, y0 - y);
cout << c;
y += 1;
if(err <= 0)
{
err += 2*y + 1;
}
else
{
x -= 1;
err += 2 * (y - x) + 1;
}
}
}
int main()
{
//screenClear();
for(int i = 20, j = 1; i > 2; --i, ++j)
{
screenFGColor(31 + j % 8);
drawcircle(20, 24, i, '\x18');
}
cursorSetPos(1, 50);
}