第十次作业

这个作业属于哪个课程 https://edu.cnblogs.com/campus/sdscfz/SF3
这个作业要求在哪里 (https://edu.cnblogs.com/campus/sdscfz/SF3/homework/12973)
这个作业的目标 第10次作业-利用递归输出100-10000之间的水仙花数
<html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>水仙花数</title>
  <script>
    for(i = 100; i < 10000; i++){
      var b= parseInt(i/100);  
      var s = parseInt((i-bai*100)/10); 
      var g= i%10;  
      if (b*b*b+ s*s*s + g*g*g == i){ 
          document.write(i +'<br />');
      }
      console.log(i);
      
    }
  </script>
</head>
<body>
</body>
</html>

posted @ 2023-05-11 00:06  吃茶叶蛋的菠萝人  阅读(5)  评论(0编辑  收藏  举报