bar.c

来自「vc library 韩国语版 希望对大家又帮助」· C语言 代码 · 共 23 行

C
23
字号
#include <graphics.h>
#include <stdlib.h>
#include <conio.h>
void main()
{
int x1,y1,w,h,color;
int gd=0,gm;
int i;
initgraph(&gd,&gm,"");
for (i=0;i<1000;i++)
  {
  color=random(16);
  x1=random(640);
  y1=random(480);
  w=random(80)+20;
  h=random(80)+20;
  setfillstyle(1,color);
  bar(x1,y1,x1+w,y1+h);
  }
getch();
closegraph();
}

⌨️ 快捷键说明

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