UCV2013I

UCV2013I

#include <stdio.h>
#include <math.h>
int main()
{
  double r;
  int l,n;
  scanf("%d%d",&l,&n);
 while(n!=0 && l!=0)
 {
  r = 2*l/(2*sin(acos(-1)/(n*2)));

  printf("%.2lf\n",r);
  scanf("%d%d",&l,&n);
  }
  return 0;
}

No comments:

Post a Comment