Write a C++ Program to print the entire screen with BROWN color.
in my case Screen Size: 600*480
Solution:
#include<iostream.h>
#include<graphics.h>
#include<conio.h>
void main()
{
cout<<"Program to print entire screen with BROWN color";
int gd=DETECT, gm;
initgraph(&gd,&gm, "..\\bgi");
for(int x=0;x<600; x++)
for(int y=0; y<480;y++)
{
putpixel(x,y, BROWN);
}
getch();
}
Output
No comments:
Post a Comment