#include<iostream>
using namespace std;
double subdivide(const double x,const double y);
int main(void)
{
using namespace std;
double x, y;
cout << "Enter two numbers:";
while (cin >> x >> y && x&&y)
{
cout << "average = :" << subdivide(x, y) << endl;
cout << "Enter two numbers:";
}
cout << "ERROY!";
cin.get();
cin.get();
return 0;
}
double subdivide(const double x, const double y)
{
return 2.0*x*y / (x + y);
}
using namespace std;
double subdivide(const double x,const double y);
int main(void)
{
using namespace std;
double x, y;
cout << "Enter two numbers:";
while (cin >> x >> y && x&&y)
{
cout << "average = :" << subdivide(x, y) << endl;
cout << "Enter two numbers:";
}
cout << "ERROY!";
cin.get();
cin.get();
return 0;
}
double subdivide(const double x, const double y)
{
return 2.0*x*y / (x + y);
}