#include <iostream> double harm_m(double,double); int main() { using namespace std; double x=0,y=0; cout<<"Please enter X and Y: "; cin>>x; cin>>y; while(x!=0 && y!=0) { cout<<"The Harmonic mean of x and y: "<<harm_m(x,y)<<endl; cout<<"Please enter X and Y: "; cin>>x; cin>>y; } cout<<"end!"; return 0; } double harm_m(double x,double y) { return 2.0*x*y/(x+y); }