Blogger Information
Blog 9
fans 0
comment 1
visits 9104
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
99乘法表和三角
坚持奋斗的博客
Original
1097 people have browsed it

思路还是跟不上我现在就是仿照你们的死记硬背,也许是基础太差吧,只能慢慢来了。

QQ截图20190327151329.png

<!DOCTYPE html>
<html>
<head>
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <title>3月26号作业</title>
 <link rel="stylesheet" href="">
</head>
<body>
 <script type="text/javascript">
  // 99乘法表
  document.write('99乘法表');
  document.write('<hr>');
  for (var i=1; i<=9; i++) {
   for (var j=i; j<=9; j++) {
    var kong="&nbsp;&nbsp;&nbsp;"
    if (i*j<10) {
     kong+="&nbsp;&nbsp;"
    }
    document.write(i+'x'+j+'='+(i*j)+kong);
   }
   document.write('<br>');
  }
   document.write('<hr>');
   document.write('*三角');
   document.write('<hr>');
  // *三角
  var i=1;
  var kong="&nbsp;";
  var xing="*";
  while(i<=10){
   k=1;
   y=9;
  while(y>i){
   document.write(kong);
   y--;   
  }
  while(k<=i*2-1){
   document.write(xing);
   k++;
  }
   document.write("<br>")
   i++;
  }
  // 99加法表
  document.write('<hr>');
  document.write('99加法表');
  document.write('<hr>');
  for (var i=1; i<=9; i++) {
   for (var j=i; j<=9; j++) {
    var kong="&nbsp;&nbsp;&nbsp;"
    if (i+j<10) {
     kong+="&nbsp;&nbsp;"
    }
    document.write(i+'+'+j+'='+(i+j)+kong);
   }
   document.write('<br>');
  }
 </script>
</body>
</html>

Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post