Loop (EX: for/while/foreach ...)
題目說明:
使用 for 迴圈搭配 HTML table 語法列出九九乘法表
註:以下預期結果 HTML 有經排版(增加空格以及換行),作答時無須進行排版,但 <br> 換行仍要顯示
1*1=1 | 1*2=2 | 1*3=3 | 1*4=4 | 1*5=5 | 1*6=6 | 1*7=7 | 1*8=8 | 1*9=9 |
2*1=2 | 2*2=4 | 2*3=6 | 2*4=8 | 2*5=10 | 2*6=12 | 2*7=14 | 2*8=16 | 2*9=18 |
3*1=3 | 3*2=6 | 3*3=9 | 3*4=12 | 3*5=15 | 3*6=18 | 3*7=21 | 3*8=24 | 3*9=27 |
4*1=4 | 4*2=8 | 4*3=12 | 4*4=16 | 4*5=20 | 4*6=24 | 4*7=28 | 4*8=32 | 4*9=36 |
5*1=5 | 5*2=10 | 5*3=15 | 5*4=20 | 5*5=25 | 5*6=30 | 5*7=35 | 5*8=40 | 5*9=45 |
6*1=6 | 6*2=12 | 6*3=18 | 6*4=24 | 6*5=30 | 6*6=36 | 6*7=42 | 6*8=48 | 6*9=54 |
7*1=7 | 7*2=14 | 7*3=21 | 7*4=28 | 7*5=35 | 7*6=42 | 7*7=49 | 7*8=56 | 7*9=63 |
8*1=8 | 8*2=16 | 8*3=24 | 8*4=32 | 8*5=40 | 8*6=48 | 8*7=56 | 8*8=64 | 8*9=72 |
9*1=9 | 9*2=18 | 9*3=27 | 9*4=36 | 9*5=45 | 9*6=54 | 9*7=63 | 9*8=72 | 9*9=81 |
<table border="1">
<tr>
<td>1*1=1</td>
<td>1*2=2</td>
<td>1*3=3</td>
<td>1*4=4</td>
<td>1*5=5</td>
<td>1*6=6</td>
<td>1*7=7</td>
<td>1*8=8</td>
<td>1*9=9</td>
</tr>
<tr>
<td>2*1=2</td>
<td>2*2=4</td>
<td>2*3=6</td>
<td>2*4=8</td>
<td>2*5=10</td>
<td>2*6=12</td>
<td>2*7=14</td>
<td>2*8=16</td>
<td>2*9=18</td>
</tr>
<tr>
<td>3*1=3</td>
<td>3*2=6</td>
<td>3*3=9</td>
<td>3*4=12</td>
<td>3*5=15</td>
<td>3*6=18</td>
<td>3*7=21</td>
<td>3*8=24</td>
<td>3*9=27</td>
</tr>
<tr>
<td>4*1=4</td>
<td>4*2=8</td>
<td>4*3=12</td>
<td>4*4=16</td>
<td>4*5=20</td>
<td>4*6=24</td>
<td>4*7=28</td>
<td>4*8=32</td>
<td>4*9=36</td>
</tr>
<tr>
<td>5*1=5</td>
<td>5*2=10</td>
<td>5*3=15</td>
<td>5*4=20</td>
<td>5*5=25</td>
<td>5*6=30</td>
<td>5*7=35</td>
<td>5*8=40</td>
<td>5*9=45</td>
</tr>
<tr>
<td>6*1=6</td>
<td>6*2=12</td>
<td>6*3=18</td>
<td>6*4=24</td>
<td>6*5=30</td>
<td>6*6=36</td>
<td>6*7=42</td>
<td>6*8=48</td>
<td>6*9=54</td>
</tr>
<tr>
<td>7*1=7</td>
<td>7*2=14</td>
<td>7*3=21</td>
<td>7*4=28</td>
<td>7*5=35</td>
<td>7*6=42</td>
<td>7*7=49</td>
<td>7*8=56</td>
<td>7*9=63</td>
</tr>
<tr>
<td>8*1=8</td>
<td>8*2=16</td>
<td>8*3=24</td>
<td>8*4=32</td>
<td>8*5=40</td>
<td>8*6=48</td>
<td>8*7=56</td>
<td>8*8=64</td>
<td>8*9=72</td>
</tr>
<tr>
<td>9*1=9</td>
<td>9*2=18</td>
<td>9*3=27</td>
<td>9*4=36</td>
<td>9*5=45</td>
<td>9*6=54</td>
<td>9*7=63</td>
<td>9*8=72</td>
<td>9*9=81</td>
</tr>
</table>