C语言经典案例:画椭圆ellipse(在TC中实现)。
栏目分类:C语言教程 发布日期:2020-02-09 浏览次数:次
C语言案例分析:无。
程序源代码:
// Copyright © 2015年 菜鸟教程. All rights reserved.
#include "stdio.h"
#include "graphics.h"
#include "conio.h"
int main()
{
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<num;i++)
{
ellipse(250,250,0,360,top,bottom);
top-=5;
bottom+=5;
}
getch();
}
本文由IT教学网整理发布,转载请注明出处:http://www.itjx.com/jiaocheng/cyuyan/892.html