C Graphics Different Shapes Program

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph (&gd,&gm,"C://TC//BGI");
setbkcolor(WHITE);
setcolor(RED);
settextstyle(8,0,2);
outtextxy(210,10,"DIFFERENT SHAPES");
line(10,80,90,80);
setcolor(9);
outtextxy(30,90,"Line");
setcolor(RED);
ellipse(200,70,10,370,70,30);
outtextxy(165,95,"Ellipse");
line(400,35,300,90);
line(400,35,500,90);
line(300,90,500,90);
outtextxy(350,95,"Triangle");
circle(65,200,60);
outtextxy(30,260,"Circle");
rectangle(160,160,350,250);
outtextxy(180,260,"Rectangle");
setcolor(RED);
setfillstyle(SOLID_FILL,RED);
bar(360,160,530,250);
outtextxy(420,260,"Bar");
bar3d(10,310,125,370,10,10);
outtextxy(25,380,"Bar 3D");
putpixel(250,340,RED);
outtextxy(225,380,"Pixel");
arc(450,370,0,180,50);
outtextxy(430,380,"Arc");
getch();
closegraph();
}



OUTPUT :




To know about each syntax and command in this program click on the video  below and to get detailed knowledge about GRAPHICS watch each video of my channel PROGRAMMING ADDA.

Comments

Popular posts from this blog

C Graphics Moving CAR Program

How To Draw a Hut in C Graphics