funtc165b.dat
来自「C++指令字典 一个方便的软件 用于C++指令的查询」· DAT 代码 · 共 35 行
DAT
35 行
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
int gdriver = DETECT, gmode, errorcode;
int xasp, yasp, midx, midy;
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());
getaspectratio(&xasp, &yasp);
circle(midx, midy, 100);
getch();
cleardevice();
setaspectratio(xasp/2, yasp);
circle(midx, midy, 100);
getch();
cleardevice();
setaspectratio(xasp, yasp/2);
circle(midx, midy, 100);
getch();
closegraph();
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?