#include<cstdio> #include<cmath> using namespace std; #define pi 2*acos(0) int main() { double r,n,ans; while (scanf("%lf%lf",&r,&n)!=EOF) { ans=n*r*r*sin(2.0*pi/n)/2; printf("%.3lf\n",ans); } return 0; }
Saturday, July 16, 2016
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment