实例说明
在屏幕中绘制一个椭圆,其内部用黄色网格来填充。
实现过程
(1)打开运行环境,新建一个源文件
(2)引用头文件
#include
#include
int main()
{ int VGA,VGAHI,initgraph,ellipse;
int x=360,y=160,driver=VGA,mode=VGAHI;
int num=20,i;
int top,bottom;
initgraph(&driver,&mode,"");
top=y-30;
bottom=y-30;
for(i=0;i
ellipse(250,250,0,360,top,bottom);
top-=5;
bottom+=5;
system(color=yellow );
}
getch();
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)