编写函数double rect-area(double length,double width=0),

学习 时间:2026-08-25 00:08:48 阅读:5604
编写函数double rect-area(double length,double width=0),编写函数double rect-area(double length,double width=0):当width=0时计算正方形面积,否则计算长方形面积

最佳回答

高高的机器猫

乐观的飞鸟

2026-08-25 00:08:48

double rect_area(double length,double width=0){if(width==0。0) width=length;return length*width;}

最新回答共有2条回答

  • 紧张的豌豆
    回复
    2026-08-25 00:08:48

    double rect_area(double length,double width=0){if(width==0。0) width=length;return length*width;}

上一篇 德标中表面粗糙度RZ16转换成RA是多少

下一篇 如何配制1.5%的冰乙酸水溶液1000ml?