Advertisement

C 绘制椭圆

阅读量:

C语言画圆

利用C语言实现椭圆绘制功能。

完整代码示例

复制代码
    #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();
    }
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    

![在这里插入图片描述](https://ad.itadn.com/c

全部评论 (0)

还没有任何评论哟~