C 实战练习题目63

题目:画椭圆ellipse(在TC中实现)。

程序分析:无。

程序源代码:

 1 #include "stdio.h"
 2 #include "graphics.h"
 3 #include "conio.h"
 4 int main()
 5 {
 6     int x=360,y=160,driver=VGA,mode=VGAHI;
 7     int num=20,i;
 8     int top,bottom;
 9     initgraph(&driver,&mode,"");
10     top=y-30;
11     bottom=y-30;
12     for(i=0;i<num;i++)
13     {
14         ellipse(250,250,0,360,top,bottom);
15         top-=5;
16         bottom+=5;
17     }
18     getch();
19 }

感谢你的阅读,请用心感悟!希望可以帮到爱学习的你!!分享也是一种快乐!!!请接力。。。

点击查看原文,谢谢!

原文地址:https://www.cnblogs.com/kangyifan/p/13235778.html