#include <stdio.h>
#include <math.h>
#include <Windows.h>
#define half(n) floor(n+0.5)
#define pi 3.14159
#define fig '.'
#define th1 (7*pi)
#define size 25
#define scale (size/12.0)
double x;
double y;
void gotoxy(int, int);
void fun(double th)
{
double r = th;
x = r*cos(th);
y = r*sin(th);
}
void main()
{
for (double th=0; th<=th1; th+=0.01)
{
fun(th);
int xp, yp;
xp = half(2*(x/scale + 20)) ;
yp = half(11 - (y/scale)) ;
gotoxy(xp, yp); printf("%c", fig);
}
while(1);
}
void gotoxy(int x, int y)
{
COORD cur;
cur.X = x;
cur.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), cur);
}
dddwj