C 练习实例58

C 语言教程 · 2019-02-22 08:28:56

题目:学用rectangle画方形。(在TC中实现)。

程序分析:无。

程序源代码:

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

#include "graphics.h"
int main()
{
    int x0,y0,y1,x1,driver,mode,i;
    driver=VGA;mode=VGAHI;
    initgraph(&driver,&mode,"");
    setbkcolor(YELLOW);
    x0=263;y0=263;y1=275;x1=275;
    for(i=0;i<=18;i++)
    {
        setcolor(1);
        rectangle(x0,y0,x1,y1);
        x0=x0-5;
        y0=y0-5;
        x1=x1+5;
        y1=y1+5;
    }
    settextstyle(DEFAULT_FONT,HORIZ_DIR,2);
    outtextxy(150,40,"How beautiful it is!");
    line(130,60,480,60);
    setcolor(2);
    circle(269,269,137);
}

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

查看所有标签

High Performance Python

High Performance Python

Andrew Lewis / O'Reilly Media, Inc. / 2010-09-15 / USD 34.99

Chapter 1. Introduction Section 1.1. The High Performance Buzz-word Chapter 2. The Theory of Computation Section 2.1. Introduction Section 2.2. Problems Section 2.3. Models of Computati......一起来看看 《High Performance Python》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

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

正则表达式在线测试