dev c++编辑图形出现问题,求教
#include<graphics.h>#include<math.h>#definePI3.1515926intmain(){intx,y,y1,r=50,r1;dou...
#include<graphics.h>
#include<math.h>
#define PI 3.1515926
int main()
{
int x,y,y1,r=50,r1;
double a;
int gdriver=VGA,gmode=VGAHI,color;
initgraph(&gdriver,&gmode,"c:\\tc\\bgi");
cleardevice();
setcolor(RED);
setbkcolor(WHITE);
y1=240-r;
for(a=0;a<2+PI/18)
{
x=r*cos(a)+320;
y=r*sin(a)+240;
r1=sqrt((x-320)*(x-320+(y-y1)*(y-y1));
circle(x,y,r1);
}
getch();
closegraph();
} 展开
#include<math.h>
#define PI 3.1515926
int main()
{
int x,y,y1,r=50,r1;
double a;
int gdriver=VGA,gmode=VGAHI,color;
initgraph(&gdriver,&gmode,"c:\\tc\\bgi");
cleardevice();
setcolor(RED);
setbkcolor(WHITE);
y1=240-r;
for(a=0;a<2+PI/18)
{
x=r*cos(a)+320;
y=r*sin(a)+240;
r1=sqrt((x-320)*(x-320+(y-y1)*(y-y1));
circle(x,y,r1);
}
getch();
closegraph();
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询