题目
编写函数double rect-area(double length,double width=0),
编写函数double rect-area(double length,double width=0):当width=0时计算正方形面积,否则计算长方形面积
编写函数double rect-area(double length,double width=0):当width=0时计算正方形面积,否则计算长方形面积
提问时间:2021-04-01
答案
double rect_area(double length,double width=0){
if(width==0.0) width=length;
return length*width;
}
if(width==0.0) width=length;
return length*width;
}
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
最新试题
热门考点
- 1take part in 后面一定要跟宾语么?there will be a discussion tomorrow,all those who want to______,
- 2(467+36×3)÷23 3200÷(1280-72×15) 运算顺序写下
- 3问题:a、b、c是△ABC的三边,试判断关于x的方程cx2-(a+b)x+c/4=0的根的情况.
- 4Does the hamburger _______ good?I want to eat another one.
- 5函数y=x+2cosx在区间[0,π/2]上的最大与小值
- 6用山崩地裂造一个句子?
- 7x y 为任意非零实数 求证 等式1/x + 1/y=1/(x+y)总不成立
- 8求一篇英语作文 丽丽想到国外读书,你写信劝他在国内读书,并列举国内教育的好处
- 9we are all looking forward ____a great trip横线上填什么?
- 101.宋林计划加工500个零件,第一天加工了10%,由于技术不断熟练,第二天比第一天多加工8%,他第二天加工了多少零件?