How To Create Stars In Night Sky Animation in C Or C++ (Computer Graphics)
PROJECT BY
(SIMPLIFY LEARN PROGRAMMING)
ON
STARS IN NIGHT SKY ANIMATION
SOURCE CODE:
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<stdlib.h>
void main()
{
int gd=DETECT,gm;
int i,x,y;
initgraph(&gd,&gm,"C:\\TC\\BGI");
while(!kbhit())
{
for(i=0;i<500;i++)
{
x=rand()%getmaxx();
y=rand()%getmaxy();
putpixel(x,y,15);
}
delay(500);
cleardevice();
}
getch();
closegraph();
}
Comments
Post a Comment