don't know how to give blinking effects

This my code for my name.I did it and got the output too,
but i don't know how to give random colors or blinking effects to it.
Can you help me?


#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<stdio.h>
#include<stdlib.h>
int main()
{
int gd=DETECT,gm,x,y;
initgraph(&gd,&gm,"c:\\TurboC3\\bgi");
setcolor(10);
line(1,235,520,235);

setcolor(10);
line(1,97,520,97);

//R



//|
//|
//|
delay(500);
setcolor(4);
line(1,100,1,230);
line(2,101,2,231);
line(3,102,3,232);

//|
//|
//|
delay(500);
setcolor(4);
line(90,160,90,100);
line(91,161,91,101);
line(92,162,92,102);

//|
//|
delay(500);
setcolor(4);
line(231,230,231,100);
line(232,231,232,101);
line(233,232,233,102);


//|
//|
delay(500);
setcolor(4);
line(302,232,302,102);
line(300,230,300,100) ;
line(301,231,301,101);

//|
//|
delay(500);
setcolor(4);
line(320,232,320,101);
line(321,233,321,102);
line(322,234,322,103);

//|
//|
delay(500);
setcolor(4);
line(400,232,400,100);
line(401,233,401,101);
line(402,234,402,102);

//|
//|
//|
delay(500);
setcolor(4);
line(418,232,418,100);
line(419,233,419,101);
line(420,234,420,102);

//\
//\
//\
delay(500);
setcolor(4);
line(1,160,90,230);
line(2,161,91,231);
line(3,162,92,232);
line(4,163,93,233);
line(5,164,94,234);

/* \
\
\*/
delay(500);
setcolor(4);
line(220,230,160,100);
line(221,231,161,101);
line(222,232,162,102);




//_______________________________
//A

/* /
/
/ */
delay(500);
setcolor(4);
line(160,100,120,230);
line(161,101,121,231);
line(162,102,122,232);

//------
delay(500);
setcolor(4);
line(1,100,90,100);
line(2,101,91,101);
line(3,102,92,102);


//-----
delay(500) ;
setcolor(4);
line(1,160,90,160);
line(2,161,91,161);
line(3,162,92,162);


//----
delay(500);
setcolor(4);
line(141,160,188,160);
line(142,161,189,161);
line(143,162,190,162);

//--
delay(500);
setcolor(4);
line(233,160,300,160);
line(232,161,301,161);
line(231,159,299,159);


//____________________________
//H

//_________________________________
//U

//__

delay(500);
setcolor(4);
line(320,232,400,232);
line(321,233,401,233);
line(319,231,399,231);

//_____________________________
//L
//__
delay(500);
setcolor(4);
line(416,230,499,230);
line(417,231,500,231);
line(418,232,501,232);
line(419,233,502,233);
// line(420,234,503,234);

getch();

closegraph();
return 0;
}
Topic archived. No new replies allowed.