More Related Content
What's hot (20)
Bcsl 033 data and file structures lab s1-2 C Program : Sorting : Bubble, Fcfs Cpu Scheduling With Gantt Chart Dado un vector imprimir cuantas vocales tiene Bcsl 033 data and file structures lab s4-3 contoh Program C++ tentang fungsi for Memoria dinámica ejercicio 07 5 반복문(break,contine).key Viewers also liked (11)
Need for reliable statistics 정품남성발기제 『 W6.ow.to 』 톡 w2015 ♡ 남성발기제판매,남성발기제 효능,남성발기제 성분,남성발기제 종류, 남성발기제 치사량,... Crise democracia fascismos compassionate care car pool to school The Student Survival sMOOC - Designing and Piloting a course in partnership w... ¿Cómo atacan los patógenos a las plantas? New microsoft power point presentation More from Sonia Pahuja (14)
numerical method solutions Bisection method solved questions Graphics exercise (b.tech) Graphics exercise (b.tech) Surajkund Mella Faridabad DATABASE MANAGEMENT SYSTEM Scanfill polygon
- 1. #include <stdio.h>
#include <conio.h>
#include <graphics.h>
main()
{
int n,i,j,k,gd,gm,dy,dx;
int x,y,temp;
int a[20][2],xi[20];
float slope[20];
clrscr();
printf("nntEnter the no. of edges of polygon : ");
scanf("%d",&n);
printf("nntEnter the cordinates of polygon :nnn ");
for(i=0;i<n;i++)
{
printf("tX%d Y%d : ",i,i);
scanf("%d %d",&a[i][0],&a[i][1]);
}
a[n][0]=a[0][0];
a[n][1]=a[0][1];
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"c:tcbgi");
/*- draw polygon -*/
for(i=0;i<n;i++)
{
line(a[i][0],a[i][1],a[i+1][0],a[i+1][1]);
}