My Profile

Ahmednagar, Maharashtra, India
I, Das ShrikKrishna J. MCA III IMSCD&R, Ahmednagar.
Showing posts with label Program to draw fill Triangle and Hexagon Graphics(C). Show all posts
Showing posts with label Program to draw fill Triangle and Hexagon Graphics(C). Show all posts

Thursday, 28 July 2011

Program to draw & fill Triangle & Hexagon


/* Program to draw & fill
Triangle & Hexagon */
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm;
int np=4,tri[8]={200,50,150,100,250,100,200,50};
int hex[14]={400,50,450,50,500,100,450,150,400,150,350,100,400,50};
initgraph(&gd,&gm,"c:\\turboc3\\");
drawpoly(np,tri);
np=7;
drawpoly(np,hex);
getch();
closegraph();
}

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | cheap international calls