Advertisement
noshin98

uva 10432

Jul 10th, 2016
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5.  
  6.     double pi=2*acos(0.00);
  7.     double r,n,area,b;
  8.     while(scanf("%lf%lf",&r,&n)==2)
  9.     {
  10.         b=sin((2*pi)/n);
  11.     area=(r*r*n*b)/2;
  12.     printf("%.3lf\n",area);
  13.     }
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement