Programers Place
Please login .
If you are not registered place register.

Join the forum, it's quick and easy

Programers Place
Please login .
If you are not registered place register.
Programers Place
Would you like to react to this message? Create an account in a few clicks or log in to continue.

A program to draw a space with stars

Go down

A program to draw a space with stars Empty A program to draw a space with stars

Post  Admin Thu Jul 30, 2009 2:28 am

Code:
/*A program to draw a space with stars*/
#include<graphics.h>
main()
{
int gd=DETECT,gm;
int i,x,y;
initgraph(&gd,&gm,"");
line(0,0,640,0);
line(0,0,0,480);
line(639,0,639,480);
line(639,479,0,479);
for(i=0;i<=1000;i++)
{
x=rand()%639;
y=rand()%480;
putpixel(x,y,15);
}
getch();
closegraph();
}
/* End of program */
Admin
Admin
Admin

Posts : 15
Join date : 2009-07-29
Age : 31
Location : Jaipur(India)

https://programmersplace.board-directory.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum