为什么在VC运行不了???
#include<math.h>#include<graphics.h>
void main()
{float t;
int x0=320,y0=240;
int n,i,j,r;
int x[50],y[20];
int driver=DETECT,mode;
printf("input n(23~31)and r(100~200)\n");
scanf("%d%d",&n,&r);
initgraph(&driver,&mode,"");
cleardevice();
setbkcolor(WHITE);
setcolor(RED);
t=6.283r8/n;
for(i=0;i<n;i++)
{x[i]=r*cos(i*t)+x0;
y[i]=r*sin(i*t)+y0;
}
for(i=0;i<n-2;i++)
{for(j=i+1;j<=n-1;j++)
line(x[i],y[i],x[j],y[j]);
}
closegraph();
}