C 练习实例63

C 语言教程 · 2019-02-22 09:42:05

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

程序分析:无。

程序源代码:

//  Created by www.codercto.com on 15/11/9.
//  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();
}

点击查看所有 C 语言教程 文章: https://codercto.com/courses/l/17.html

查看所有标签

编程卓越之道

编程卓越之道

海德 / 张菲 / 电子工业出版社 / 2007-4 / 69.00元

《编程卓越之道第二卷:运用底层语言思想编写高级语言代码》是《编程卓越之道》系列书的第二卷,将探讨怎样用高级语言(而非汇编语言)编程得到高效率机器代码。在书中,您可以学到如何分析编译器的输出,以便检验代码的所作所为,从而得到高质量的机器码;了解编译器为常见控制结构生成的典型机器指令,以便在编写高级语言程序时选用恰当的语句;掌握编译器将各种常量和变量类型转换成机器数据的方法,以便于使用这些数据写出又快......一起来看看 《编程卓越之道》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具