#include	"/usr/include/graphics/graphics/graphics.h"
#include "math.h"
main()
{
int		ip1,n,nm1,j,i;
real		theta,thinc,radius;
real		x[100],y[100];
devicetype 	device;

	askdev(&device);
	printf("How many points and what radius ? ");
        scanf("%d %lf",&n,&radius);while(getchar() !='\n');
	start(2);
 	plot(9.5,7.375,-3);
	plot(radius,0.0,3);

	theta=0.0;
	thinc=6.2831853/n;
	for(i=0;i<n;i++)
	{
		theta=theta+thinc;
		x[i]=radius*cos(theta);
		y[i]=radius*sin(theta);
		plot(radius*cos(theta),radius*sin(theta),2);
	}
/*	join point to point.*/
	nm1=n-1;
	for (i=0;i<nm1;i++)
	{
		ip1=i+1;
		for (j=ip1;j<n;j++)
		{
			plot(x[i],y[i],3);
			plot(x[j],y[j],2);
		}
	}
	enplot();
}
