#include <iostream>
using namespace std;
int Tiaohe(double , double );
int main()
{
double a,b,c;
cout<<"请输入两个不为0的数:"<<endl;
cin>>a;
cin>>b;
while(1)
{
if (a == 0 || b == 0)
{
cout<<"输入错误。"<<endl;
exit(0);
}
c = Tiaohe(a,b);
cout<<"调和平均值为:"<<c<<endl;
cin>>a;
cin>>b;
}
return c;
}
int Tiaohe(double x, double y)
{
return 2.0*x*y/(x+y);
}