MIFENG.CPP
上传用户:wszmarenbt
上传日期:2013-04-26
资源大小:2552k
文件大小:0k
源码类别:

Windows编程

开发平台:

Visual C++

  1. #include<graphics.h>
  2. #include<conio.h>
  3. void main(void)
  4. {
  5. void DRAW6(int X,int Y);
  6. int driver=DETECT,mode;
  7. int NUM,NUM1;
  8. registerbgidriver(EGAVGA_driver);
  9. initgraph(&driver,&mode,"");
  10. for(NUM=0;NUM<6;NUM++)
  11. for(NUM1=0;NUM1<3;NUM1++)
  12. DRAW6(NUM*100+50,NUM1*150);
  13. getch();
  14. closegraph();
  15. }
  16. void DRAW6(int X,int Y)
  17. {
  18. int DATA[]={X,Y,X-50,Y+50,X-50,Y+100,X,Y+150,X+50,Y+100,X+50,Y+50,X,Y};
  19. setcolor(YELLOW);
  20. setfillstyle(3,YELLOW);
  21. fillpoly(6,DATA);
  22. }