C++ primer plus(sixth edition) 编程练习答案(answers for programing exercises)第七章(chapter 7) 1-5
7.1//calculatetheharmonicaverage//programenduntilyouenterzero#includeusingnamespacestd;doubleh_average(double,double);intmain(){doublea,b,average;cout>a>>b&&a!=0&&b!=0)//a*b!=0{average=h_average(a,b);