using turboc++
------------------------------------------------------------------------
//drawing triangle
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
clrscr();
int gdriver, gmode; //variables declaration
gdriver=DETECT; // detection of graphics driver
initgraph(&gdriver, &gmode, "c:\\tc\\BGI");
line(300,100,300,200);//draws frist line
line(300,200,350,200);//draws second line
line(300,100,350,200);//draws third line
getch(); //gets one character from user and closes the graphics.
closegraph(); //closes graphics.h
}
------------------------------------------------------------------------
//drawing triangle
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
clrscr();
int gdriver, gmode; //variables declaration
gdriver=DETECT; // detection of graphics driver
initgraph(&gdriver, &gmode, "c:\\tc\\BGI");
line(300,100,300,200);//draws frist line
line(300,200,350,200);//draws second line
line(300,100,350,200);//draws third line
getch(); //gets one character from user and closes the graphics.
closegraph(); //closes graphics.h
}