
600 Programming in C
Explanation:
In this program, using setlinestyle() function, a line drawn can be displayed in a
different style. It requires three integer arguments. The first represents style of line, second
represents pattern and the third represents thickness.
15.14 Program to draw lines of different styles with increasing length and displaying text.
line(40,9,40,60);
setlinestyle(2,1,1);
line(60,9,60,70);
getch();
closegraph();
restorecrtmode();
}
# include <graphics.h>
void main()
{
int gd =DETECT,gm,x,y,i,k=20,j=200;
initgraph(&gd,&gm,“d:\turboc2\bgi”);
settextstyle(1,0,30);
settextjustify(100,50);
setcolor(GREEN);
outtextxy(20,40,“line”); ...