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

学习 时间:2026-03-30 07:26:51 阅读:3708
编写函数double rect-area(double length,double width=0),编写函数double rect-area(double length,double width=0):当width=0时计算正方形面积,否则计算长方形面积

最佳回答

老迟到的寒风

斯文的蜜蜂

2026-03-30 07:26:51

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

最新回答共有2条回答

  • 超级的纸鹤
    回复
    2026-03-30 07:26:51

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

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

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