![]() |
||
|
*停權中*
加入日期: Jul 2004 您的住址: ♡正妹與海的教室♡
文章: 168
|
小弟想用ASP.Net在網頁上顯示九九乘法表
可是小弟只會寫1乘到9 <html> <head> <title>homework</title> </head> <body> <% Dim a As Integer Dim b As Integer=1 Dim counter As Integer Dim total As Integer Do While b <=9 total=0 a=1 Response.Write(a & "*" & b & "=" & total) counter = 0 Do total =a * b counter += 1 Loop Until counter >b Response.Write(total & "<br>") b+=1 Loop %> </body> </html> 小弟應該如何修改讓ASP.Net在網頁上顯示九九乘法表? 請問是否有更簡潔的辦法? |
|||||||
|
|
|
Regular Member
![]() ![]() 加入日期: May 2003 您的住址: 馬來西亞
文章: 81
|
<%
a = 1 do while a <= 9 b = 1 do while b <= 9 response.write a & "*" & b & "=" & a*b & "<br>" & vbcr b = b + 1 loop a = a + 1 loop %>
__________________
|
||
|
|