AIM:
To
draw different shapes using different functions
ALGORITHM:
·
Initialize
variables
·
Draw
oval shape using Built-in-Function
·
Draw
rectangle shape using Built-in-Function
·
Draw
line using Built-in-Function
·
Draw
arc using Built-in-Function
·
Display
the shapes
CODINGS:
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
void main()
{
int
gd=DETECT,gm,i,j;
initgraph(&gd,&gm,"");
cleardevice();
setbkcolor(BLACK);
line(60,70,150,70);
setcolor(GREEN);
setfillstyle(1,9);
fillellipse(250,250,70,30);
ellipse(250,250,0,360,70,30);
setcolor(5);
arc(350,350,0,140,45);
setfillstyle(1,6);
bar(10,220,150,300);
getch();
}
OUTPUT:
RESULT:
Thus, the program has been
successfully executed & output is verified.
No comments:
Post a Comment