Aim:Divide Screen into four region. Draw circle rectangle,ellipse and half ellipse in each region with appropriate message.
Source Code:
#include<iostream.h>
#include<coino.h>
#include<graphics.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"C://TURBOC3//BGI");
line(getmaxx()/2,0,getmaxx()/2,getmaxy());
line(getmaxy()/2,getmaxx(),getmaxy()/2);
circle(110,110,60);
outtextxy(87,180,"CIRCLE");
rectangle(400,80,550,150);
outtextxy(450,200,"RECTANGLE");
ellipse(150,350,0,360,35,70);
outtextxy(130,430,"ELLIPSE");
ellipse(450,430,"ELLIPSE"):
getch();
closegraph();
}
Output:
}
Output:
No comments:
Post a Comment