Program to Draw a Triangles using line

#include<stdio.h>
#include<conio.h>
#include<graphics.h>

void main()
{
  clrscr();
  int gm=DETECT,gd,i;


   initgraph(&gm,&gd,"");

   for(i=0;i<=400;i=i+10)
   {
  line(10+i,300,200,100);

  }
  getch();
}

Leave a Reply