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

Windows编程

开发平台:

Visual C++

  1. /*----------------------------PICTURE-----------------------------*/
  2. /*     NAME: A BEAUTIFUL BALL    */
  3. /*----------------------------PIICTURE-----------------------------*/
  4. #include<graphics.h>
  5. #include<dos.h>
  6. #include<conio.h>
  7. void main()
  8. {
  9. int driver=DETECT,mode;
  10. int X1=250,Y1=244,R1=50,
  11.     X2=260,Y2=233,R2=70,
  12.     X3=270,Y3=210,R3=100;
  13. registerbgidriver(EGAVGA_driver);
  14. initgraph(&driver,&mode,"");
  15. setcolor(DARKGRAY);
  16. circle(X3,Y3,R3);
  17. setfillstyle(1,DARKGRAY);
  18. floodfill(X3,Y3,DARKGRAY);
  19. delay(30);
  20. setcolor(LIGHTGRAY);
  21. circle(X2,Y2,R2);
  22. setfillstyle(1,LIGHTGRAY);
  23. floodfill(X2,Y2,LIGHTGRAY);
  24. delay(30);
  25. setcolor(WHITE);
  26. circle(X1,Y1,R1);
  27. setfillstyle(1,WHITE);
  28. floodfill(X1,Y1,WHITE);
  29. delay(30);
  30. getch();
  31. setcolor(11);
  32. outtextxy(10,450,"*-*-*-*-*-*-*-*-*-*-*-*-*"
  33.   " ISN'T IT A BEAUTIFUL BALL?"
  34.   " *-*-*-*-*-*-*-*-*-*-*-*-*-*");
  35. getch();
  36. closegraph();
  37. }