标签:lan 数字 parse 实现 meta doctype body int rip
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
/*实现1!+2!+3!+4!+5!+....+n!*/
var n = parseInt(prompt("请输入数字"));
var z = 0;
for(var i = 1;i<=n;i++){
for(var j = 0;j<i;j++){
var s =1;
s=s*j;
s++;
z=s+z
}
}
document.write(z)
</script>
</head>
<body>
</body>
</html>
标签:lan 数字 parse 实现 meta doctype body int rip
原文地址:https://www.cnblogs.com/maimaiti/p/10553796.html