https://vjudge.net/problem/POJ-1799
纯数学题,不算难,借助直角三角形求解:
cin >> R >> n;
double a = sin(PI / n);
r = a * R / (a + 1);
printf("%.3lf\n\n", r);//别忘空行
https://vjudge.net/problem/POJ-1799
纯数学题,不算难,借助直角三角形求解:
cin >> R >> n;
double a = sin(PI / n);
r = a * R / (a + 1);
printf("%.3lf\n\n", r);//别忘空行