#includeusing namespace std;double tiaohe (double,double);int main(){double x,y;coutx>>y&&x*y!=0) {double t_tiaohe=tiaohe(x,y);cout

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/10 02:23:35
#includeusing namespace std;double tiaohe (double,double);int main(){double x,y;coutx>>y&&x*y!=0) {double t_tiaohe=tiaohe(x,y);cout

#includeusing namespace std;double tiaohe (double,double);int main(){double x,y;coutx>>y&&x*y!=0) {double t_tiaohe=tiaohe(x,y);cout
#include
using namespace std;
double tiaohe (double,double);
int main()
{
double x,y;
coutx>>y&&x*y!=0)
{double t_tiaohe=tiaohe(x,y);
cout

#includeusing namespace std;double tiaohe (double,double);int main(){double x,y;coutx>>y&&x*y!=0) {double t_tiaohe=tiaohe(x,y);cout
定义:调和平均数是总体各单位标志值倒数的算术平均数的倒数,也称倒数平均数.
while(cin>>x>>y&&x*y!=0)
连续输入x和y的值,当x和y都不为0时计算x和y的调和平均数
一旦输入的x和y其中有一个为0,则退出while循环