float Harmean(float a, float b);
int main()
{
    float x = 1.f, y = 1.f, harm;
    while (x != 0 && y != 0)
    {
        cout << "enter two number,first:";
        cin >> x;
        cout << "enter two number,second:";
        cin >> y;
        harm = Harmean(x, y);
        if (x != 0 && y != 0)
            cout << x << "和" << y << "的调和平均数为" << harm << endl;
    };
}
float Harmean(float a, float b)
{
    float har = (2 * a * b) / (a + b);
    return har;
}
 
       
      
			         
           
           
           
                    
 
           
           
           
           
           
           
          
