首页 > 代码库 > 阶梯相乘

阶梯相乘

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <script type="text/javascript">
         window.onload=function(){
            function a(b){
                var num=1;
                while(b>1){
                    num*=b;
                    b--;
                }
                return num;
            }
            alert(a(4));
         };
    </script>
</head>
<body>
    
</body>
</html>

阶梯相乘