//Draw House Using c++ Graphic
Today we will see how to draw a house using the c ++ graphic. The code of this program is given below.
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
line(50,450,565,450);
rectangle(150,310,470,450);
line(240,450,240,375);
line(385,450,385,375);
ellipse(313,379,7,175,73,40);
line(245,450,245,375);
line(380,450,380,377);
ellipse(313,379,3,175,68,35);
rectangle(245,375,380,450);
line(310,377,310,450);
ellipse(302,410,0,360,2,4);
ellipse(318,410,0,360,2,4);
line(565,450,565,313);
line(465,310,515,286);
line(574,312,515,286);
line(469,315,515,292);
line(574,318,515,292);
line(574,312,574,318);
rectangle(490,325,545,435);
line(519,325,519,435);
line(490,355,545,355);
//left
line(50,450,50,314);
line(40,312,95,286);
line(150,310,95,286);
line(40,318,95,292);
line(150,317,95,292);
line(40,312,40,318);
rectangle(70,325,126,435);
line(99,325,99,435);
line(70,355,126,355);
//upper
rectangle(150,200,470,300);
line(150,300,150,310);
line(470,300,470,310);
rectangle(240,290,375,300);
line(245,290,245,260);
line(249,290,249,260);
line(269,290,269,260);
line(273,290,273,260);
line(294,290,294,260);
line(298,290,298,260);
line(321,290,321,260);
line(325,290,325,260);
line(346,290,346,260);
line(350,290,350,260);
line(366,290,366,260);
line(370,290,370,260);
rectangle(242,259,374,256);
rectangle(260,220,353,256);
rectangle(264,224,349,256);
line(130,207,310,140);
line(130,200,310,130);
line(130,207,130,200);
line(310,140,488,207);
line(310,130,488,200);
line(488,207,488,200);
line(60,201,60,303);
line(40,200,129,200);
rectangle(80,230,130,280);
rectangle(85,235,125,275);
line(556,201,556,303);
line(577,200,487,200);
rectangle(487,230,538,280);
rectangle(492,235,533,275);
line(60,143,275,143);
line(345,143,555,143);
line(60,143,40,200);
line(556,143,577,200);
rectangle(490,117,520,143);
rectangle(485,111,525,117);
setfillstyle(SOLID_FILL,15);
circle(590,37,37);
floodfill(591,47,15);
outtextxy(20,30,".");
outtextxy(60,90,".");
outtextxy(170,30,".");
outtextxy(280,50,".");
outtextxy(440,80,".");
outtextxy(530,40,".");
outtextxy(330,670,".");
outtextxy(240,78,".");
outtextxy(10,130,".");
outtextxy(140,100,".");
outtextxy(340,110,".");
outtextxy(380,17,".");
getch();
closegraph();
}