C++primer plus第六版课后编程题答案7.1
7.1
#include<iostream>
using namespace std;
double tiaohe(double ,double );
void main71()
{
double a,b;
cout<<"Plesase enter 2 number :";
cin>>a;
cin>>b;
if(a==0||b==0)
cout<<"\nWrong input"<<endl;
else
cout<<"tiaohe is "<<tiaohe(a,b)<<endl;
system("pause");
}
double tiaohe(double a,double b)
{
return 2.0*a*b/(a+b);
}

浙公网安备 33010602011771号