#include <iostream>
using namespace std;
double harmonicMean(double x, double y);

int main() {
	double x, y;
	while (cin >> x >> y) { // 这一步是读取一行的两个数
		if (0 == x || 0 == y) break;
		cout << harmonicMean(x, y) << endl;
	}
	return 0;
}

double harmonicMean(double x, double y) {
	return 2.0 * x * y / (x + y);
}

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2022-02-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
相关资源
相似解决方案