C 练习实例64

C 语言教程 · 2019-02-22 09:57:00

题目:利用ellipse and rectangle 画图(在TC中实现)。

程序分析:无。

程序源代码:

//  Created by www.codercto.com on 15/11/9.
//  Copyright © 2015年 码农教程. All rights reserved.
//

#include "stdio.h"
#include "graphics.h"
#include "conio.h"
main()
{
    int driver=VGA,mode=VGAHI;
    int i,num=15,top=50;
    int left=20,right=50;
    initgraph(&driver,&mode,"");
    for(i=0;i<num;i++)
    {
        ellipse(250,250,0,360,right,left);
        ellipse(250,250,0,360,20,top);
        rectangle(20-2*i,20-2*i,10*(i+2),10*(i+2));
        right+=5;
        left+=5;
        top+=10;
    }
    getch();
}

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

查看所有标签

Object-Oriented Design Heuristics

Object-Oriented Design Heuristics

Arthur J. Riel / Addison-Wesley Professional / 1996-05-10 / USD 64.99

Product Description Here is the first object-oriented development book to provide specific experience-based guidelines to help developers make the right design decisions. This book offers the next ......一起来看看 《Object-Oriented Design Heuristics》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

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

多种字符组合密码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具