C PROGRAM
#include<conio.h>
int main()
{
int gd = DETECT,gm;
clrscr();
initgraph(&gd, &gm, "C:\\TC\\BGI");
setbkcolor(YELLOW);
setcolor (RED);
rectangle (400,400,100,100);
getch();
closegraph();
return 0;
}
This is C program to create Ractangle. Here setbkcolor function is used to set background-color of whole page.
and setcolor function is used to set color of that diagram.
0 Comments