C Program to Draw a Triangle using Graphics Function
Write a C Program to Draw A Triangle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include<stdio.h> #include<conio.h> #include<graphics.h> void main() { int gd = DETECT, gm; initgraph(&gd, &gm, "c:\\tc\\bgi"); line(300, 100, 200, 200); line(300, 100, 400, 200); line(200, 200, 400, 200); getch(); closegraph(); } |