public class Program { public static void main(String[] args) { System.out.println("Hi, This is Programmer"); } } _____________________________________________ you can also visit my youtube channel--> Write Hello World using java || Notepad || Command Prompt
C program to make line- #include<graphics.h> #include<conio.h> void main() { int gd=DETECT, gm; clrscr(); initgraph( & gd, & gm,"c:\\turboc3\\bgi"); line(30,15,100,15); getch(); }
Function name - putpixel Definition- putpixel is used to plot a dot on screen at specified position with specified colour. sy ntax- putpixel(int x,int y,pixelcolor); Example c program for putpixel- #include<graphics.h> #include<conio.h> void main() { int gd=DETECT, gm; clrscr(); initgraph(&gd,&gm,"c:\\turboc3\\bgi"); putpixel(20,30,4); getch(); closegraph(); } Output- As you can see red colour dot is placed at (20,30) position.
Comments
Post a Comment