⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 funtc306b.dat

📁 这是一个包含多个语言的指令集
💻 DAT
字号:
#include <graphics.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <conio.h>
char *lname[]={"SOLID_LINE","DOTTED_LINE","CENTER_LINE","DASHED_LINE","USERBIT_LINE"};
int main(void)
{
    int gdriver = DETECT, gmode, errorcode;
    int style, midx, midy, userpat;
    char stylestr[40];
    initgraph(&gdriver, &gmode, );
    errorcode = graphresult();
    if (errorcode != grOk)
    {
        printf("Graphics error: %s", grapherrormsg(errorcode));
       printf("Press any key to halt:");
        getch();
        exit(1);
    }
    midx = getmaxx() / 2;
    midy = getmaxy() / 2;
    userpat = 1;
    for (style=SOLID_LINE; style<=USERBIT_LINE; style++)
    {
        setlinestyle(style, userpat, 1);
        strcpy(stylestr, lname[style]);
        line(0, 0, midx-10, midy);
        rectangle(0, 0, getmaxx(), getmaxy());
        outtextxy(midx, midy, stylestr);
       getch();
        cleardevice();
    }
    closegraph();
    return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -