Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

PROGRAM:

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd, gm;
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"c:\\TC\\BGI");
setbkcolor(BLUE);
outtextxy(250,10,"EXPERIMENT NO: 1");
outtextxy(10,30,"DESIGNED BY: AMARESH.B");
outtextxy(10,40,"AIM: TO DRAW THE FOLLOWING SHAPES.");

setcolor(YELLOW);
outtextxy(20,70,"1.");
rectangle(50,60,150,150);
rectangle(60,70,140,140);
line(83,150,55,180);
line(114,150,140,180);
rectangle(40,180,160,232);

outtextxy(210,70,"2.");
rectangle(250,60,400,160);
circle(285,180,20);
circle(365,180,20);
outtextxy(440,70,"3.");
circle(550,140,70);
circle(515,110,10);
circle(580,110,10);
line(545,130,535,150);
line(545,130,558,150);
line(535,150,558,150);
rectangle(525,170,575,180);

outtextxy(20,280,"4.");
line(60,330,150,330);
line(150,280,150,330);
line(60,380,150,380);
line(60,330,60,380);
line(150,380,150,430);
line(150,280,240,355);
line(240,355,150,430);

outtextxy(310,280,"5.");
ellipse(400,280,0,360,55,40);
circle(370,270,5);
circle(425,270,5);
ellipse(400,390,0,360,30,60);

line(374,360,340,400);
line(427,360,460,400);
getch();

}
OUTPUT SCREEN :

You might also like