3. Write a short program to draw a point P(6,9).
Answers
hope it helps!!!!!!!!!!!!!!!
C program to draw a point P(6,9) on a screen.
For achieving this, we need to use the graphics library in order to import the elements of graphical model.
Here, DETECT refers to a macro definition of the library included.
'gm' refers to the graphic mode.
And then, we initialize the graphic system that triggers the graphic driver, mode, and path of the directory.
Once the graphical environment is set, we plot the pixel upon it using putpixel() method by passing the x and y coordinates, color.
Program:
#include <graphics.h>
#include <stdio.h>
#include<conio.h>
void main()
{
int gd = DETECT, gm, color;
initgraph(&gd, &gm, "");
putpixel(6, 9, RED);
getch();
closegraph();
}
Learn more:
1. Ch+=2 is equivalent to
brainly.in/question/21331324
2. A CSS file cannot be linked to a web page. State True or False.
brainly.in/question/21107345