admin 管理员组文章数量: 1184232
2024年3月10日发(作者:text函数日期)
c语言烟花代码简单完整
#include
#include
#include
#include
#include
#define range 500.0
#define duration 200
void firework(float x,float y);
void line_function1(float x);
void circle_function1(float x);
int main()
{
float x,y,r;
initgraph(640, 480);
srand(time(NULL));
while(1)
{
}
x=rand() % (int)range;
y=rand() % (int)(range*0.5);
firework(x,y);
closegraph();
return 0;
}
void firework(float x,float y)
{
}
void line_function1(float x)
float i;
for(i=0;i { } cleardevice(); setcolor(WHITE); line_function1(x); circle_function1(i); Sleep(20); { } void circle_function1(float x) { } setlinestyle(0, 0, 10); setcolor(rand()%15+1); circle(x, range*0.5, 3); float x2; setlinestyle(0, 0, 3); x2=x+rand()%10*10; setcolor(rand()%15+1); line(x, range*0.5, x2, range*0.5); line(x, range*0.45, x2, range*0.45); line(x, range*0.55, x2, range*0.55);
版权声明:本文标题:c语言烟花代码简单完整 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1710029404a554389.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论