LoginSignup
0
0

More than 1 year has passed since last update.

【JavaScript】繰り返し処理を利用し、九九を作成せよ。

Posted at

image.png

<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <title>九九</title>
</head>
<body>
    <script>
        var i = 0;
        var j = 0;
        var k;
        while (j < 9) {
          document.write("</br>");
          j++;
          i = 0;
            while (i < 9) {
              i++;
              k = j * i
              if ( k <= 9 ) {
                document.write( i + '' + j + '=' + '0' + k + ' ' );
              }else {
                document.write( i + '' + j + '=' + k + ' ');
              }
            }
        }
    </script>
</body>
</html>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0