#include
using namespace std;
double harmean(int x,int y);
int main()
{
 int a, b;
 cout<<"Please, enter two integers: ";

 while (!(cin>>a)||!(cin>>b)||a==0||b==0)
 {
     cin.clear();
     while(cin.get()!='\n')
            continue;
     cout<<"\nPlease, enter two integers: ";
 }
 cout<<"\nThe harmonic mean of "<<a<<" and "<<b<<" = "<<harmean(a,b);
 cout<<"\n\n";
 return 0;
}

double harmean(int x, int y)
{
    double hm=0.0;
    hm=2.0*x*y/(x+y);
    return hm;
}