📄 funtc167b.dat
字号:
#include <graphics.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
int gdriver = DETECT, gmode, errorcode;
int color, midx, midy;
char colname[35];
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;
setcolor(getmaxcolor());
settextjustify(CENTER_TEXT, CENTER_TEXT);
color = getcolor();
itoa(color, colname, 10);
strcat(colname,"is the current drawing color.");
outtextxy(midx, midy, colname);
getch();
closegraph();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -