How to avoid blinking?

Assalam-o-Alaikum!
Please help me to avoid
Blinking in my program output.
I am using Turbo c++ v.3.0

Thanks in advance!


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include<iostream.h>

#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
	int gdriver=DETECT,gmode,i,a,time=5,y;
	initgraph(&gdriver,&gmode,"c:/tc/bgi");
	for(y=time;y>=1;y--)
	{gotoxy(27,13); cout<<"Please wait car is coming..."<<time;
	time=time-1;delay(1000);}
	for(a=1;a<=2;a++)
	{
	for(i=0;i<=700;i++)
	{

	setcolor(YELLOW);
	line(1,320,700,320);
	rectangle(15+i,260,200+i,300);
	rectangle(75+i,260,120+i,200);
	line(15+i,260,75+i,200);
	line(175+i,260,120+i,200);
	circle(60+i,300,20);
	cleardevice();
	circle(150+i,300,20);
	cleardevice();
       }}
	gotoxy(33,13);
	cout<<"Press any key to Exit.";
	getch();
	closegraph();

}
Topic archived. No new replies allowed.