你好我想问您一个问题,在JS中的用if函数输出ABC的最小值

JavaScript09

你好我想问您一个问题,在JS中的用if函数输出ABC的最小值,第1张

function min(a,b,c)

{

if(a<=b&&a<=c) {

    return a

}

if(b<=a&&b<=c){

    return b

}

if(c<=a&&c<=b){

    return c

}

}

//也可用js的原生方法

Math.min(2,6,12,3,9,45,7)//2

var week = new Date().getDay()

if (week == 0) {

document.write("<script src='D.js'><\/script>")

} else if (week == 1 || 2) {

document.write("<script src='A.js'><\/script>")

} else if (week == 3 || 4) {

document.write("<script src='B.js'><\/script>")

} else if (week == 5 || 6) {

document.write("<script src='C.js'><\/script>")

}

大致方向具体语法有待测试

你没有说大于100kg的,我按5元算了:

IF(A1<=1,18,IF(A1<=15,18+(A1-1)*8,IF(A1<=50,130+(A1-15)*7,IF(A1<=100,375+(A1-50)*6,675+(A1-100)*5))))

==================================

什么语言啊?或者什么软件?