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();

}

OUTPUT:


Comments

Popular posts from this blog

How To Draw Scenery Animation in C or C++ (Computer Graphics)

How To Draw a Butterfly Animation in C (Computer Graphics)

How To Create Flying Kite Animation in C Or C++ (Computer Graphics)