2009年9月全国计算机等级考试二级C语言程序设计题(63)
来源:优易学  2011-7-30 16:28:59   【优易学:中国教育考试门户网】   资料下载   IT书店
题目:画椭圆ellipse
  1.程序分析:
  2.程序源代码:
  #include "stdio.h"
  #include "graphics.h"
  #include "conio.h"
  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();
  }

责任编辑:小草

文章搜索:
 相关文章
热点资讯
资讯快报
热门课程培训