7.1
#include
using namespace std;
double tiaohe(double ,double );
void main71()
{
double a,b;
cout<<”Plesase enter 2 number :”;
cin>>a;
cin>>b;
if(a==0b==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);
}
—————————————————————————————————————————————————— //写的错误或者不好的地方请多多指导,可以在下面留言或者给我发邮件,指出我的错误以及不足,以便我修改,更好的分享给大家,谢谢。 转载请注明出处:https://www.royalchen.com/ author:royalchen Email:royalchen@royalchen.com ———————————————————————————————————————————————————
- 本文作者: royalchen
- 本文链接: http://www.royalchen.com/2016/02/24/cprimerplus第六版课后编程题答案71/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!