#include <stdio.h>
#include <math.h>
int main()
{
double r ,a ,n, s, k, i, j;
while (scanf("%lf %lf", &r, &a) == 2)
{
if (r == 0 && a == 0) break;
r = r / 2;
n = 2 * r * r - a * a;
if (n >= 0)
{
k = 2 * (r * r + a * sqrt(n));
if (k >= 0)
s = sqrt(k) - a, printf("%.6lf\n", s);
else printf("INCORRECT INFORMATION !!!\n");
}
else printf("INCORRECT INFORMATION !!!\n");
}
return 0;
}
回目錄
回首頁
沒有留言 :
張貼留言