c 语言烟花的代码源代码,c 语言实现的简单屏幕烟花程序

您所在的位置:网站首页 qq表白代码大全可复制免费版 c 语言烟花的代码源代码,c 语言实现的简单屏幕烟花程序

c 语言烟花的代码源代码,c 语言实现的简单屏幕烟花程序

2024-07-13 07:22| 来源: 网络整理| 查看: 265

#include "stdlib.h"

#include "graphics.h"

#include "stdio.h"

#include "math.h"

#include "conio.h "

#define PI  3.1425926

main()

{

int gdriver=DETECT,gmode,errorcode;

int a[10],b[10],x,y,c,r,i,j,t;

double rad = 0.0;

/* initialize graphics and local variables */

initgraph(&gdriver , &gmode ,"");

/* read result of initialization */

errorcode = graphresult();

if (errorcode != grOk)  /* an error occurred */

{

printf("Graphics error : %s/n",grapherrormsg(errorcode));

printf("Please any key to halt:");

getch();

exit(1);  /* terminate with an error code */

}

randomize();

for(;!kbhit();)

{

x=rand()%500+100; /*随机中心坐标*/

y=rand()%300+100;

/*   */

for(r = 0 ;r



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3