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://www.codercto.com/courses/l/17.html

查看所有标签

Reality Is Broken

Reality Is Broken

Jane McGonigal / Penguin Press HC, The / 2011-1-20 / USD 26.95

Visionary game designer Jane McGonigal reveals how we can harness the power of games to solve real-world problems and boost global happiness. More than 174 million Americans are gamers, and......一起来看看 《Reality Is Broken》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试