TRIANGLE IN TRIANGLE
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c\\tc\bin");
setcolor(1);
line(80,80,60,100);
line(60,100,100,100);
line(100,100,80,80);
setcolor(2);
line(80,60,40,120);
line(40,120,120,120);
line(120,120,80,60);
setcolor(3);
line(80,40,20,140);
line(20,140,140,140);
line(140,140,80,40);
getch();
closegraph();
}
Comments
Post a Comment