C Program to Draw Line in Graphics Mode.
⦁ InitGraph initializes the graphics system by loading a graphics driver from disk then putting the system into graphics mode
⦁ The syntax for line function is as follows:
line(x1,y1,x2,y2);
x1 - X Co-ordinate of first point.
y1 - Y Co-ordinate of first point.
x2 - X Co-ordinate of second point.
y2 - Y Co-ordinate of second point.
⦁ closegraph( ) function switches back the screen from graphics mode to text mode.
--------------------------------------------------------------------------------------------------------------------------
EmoticonEmoticon