1,JavaScript 代码已知任意两个正整数(a,b),将其作为直角三角形的直角边长,求斜边长。
2,已知a,b,c,求如下情况下d的值:
var a, b, c, d;
a = 1; b = 2.2; c = 3.3;d = a + b + c;
a = 1; b = 2.2; c = “3.3”;d = a + b + c;
a = 1; b = “2.2”; c = 3.3;d = a + b + c;
a = “1”; b = 2.2; c = 3.3;d = a + b + c;
a = “1”; b = 2.2; c = 3.3;d = a + (b + c);
a = “1”; b = 2.2; c = 3.3;d = (a + b) + c;
以上d的计算表达式中,加号(+)换成减号(-),结果如何?请亲自验算并体会其中的运算符规则。
谢谢楼主啊