//Program to Draw Rectangle and square
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm,midx,midy;
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
midx=getmaxx()/2; midy=getmaxy()/2;
setcolor(GREEN);
rectangle(midx-200,midy-100,midx+200,midy+100);
setcolor(YELLOW);
rectangle(midx-50,midy-50,midx+50,midy+50);
getch();
closegraph();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.