2078 11

CSC115 ยท 2078 ยท 5 marks

Write a program to draw a line using graphics function.

Write a program to draw a line using graphics function. [5]

C ProgrammingChapter 11: Introduction to GraphicsGraphics Function

In C graphics, the line(x1, y1, x2, y2) function is used to draw a line from the starting point (x1, y1) to the ending point (x2, y2). The coordinates are measured in pixels, with the origin (0, 0) at the top-left corner of the screen. Before using any graphics function, the graphics mode must be...