C++ program to draw a Pixel by accepting coordinates from the user
kw.cpp
#include<graphics.h>
#include<iostream>usingnamespacestd;intmain(){intgd=0,gm=9,x1,y1;cout<<"Enter the x coordinate ";cin>>x1;cout<<"Enter the y coordinate ";cin>>y1;initgraph(&gd,&gm,NULL);putpixel(x1,y1,15);delay(2000);return0;}
Output
kodingwindow@kw:~$ g++ kw.cpp -lgraph kodingwindow@kw:~$ ./a.out
Enter the x coordinate 50
Enter the y coordinate 50
Dear User, Thank you for visitng Kodingwindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the Kodingwindow Android app. We intend to soon make it available on the Google Play Store. Currently, Android versions 10 and up require manual apk installations. Would you like to get the app?