/* 9.11.4 programming */
#include <stdio.h>
double rec(double a,double b);
int main(void)
{
double x, y;
printf("Enter two numbers:(q to quit)\n");
while(scanf("%lf %lf",&x,&y) == 2)
{
printf("这两个参数的调和平均数是%.5f", rec(x,y));
}
printf("Bye!");
return 0;
}
double rec(double a,double b)
{
return (1/((1/a+1/b)/2));
}