PCDVD數位科技討論區

PCDVD數位科技討論區 (https://www.pcdvd.com.tw/index.php)
-   疑難雜症區 (https://www.pcdvd.com.tw/forumdisplay.php?f=34)
-   -   ASP.Net程式設計一問 (https://www.pcdvd.com.tw/showthread.php?t=401753)

feeifine 2004-10-24 01:53 PM

ASP.Net程式設計一問
 
小弟想用ASP.Net在網頁上顯示九九乘法表
可是小弟只會寫1乘到9 :ase
<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在網頁上顯示九九乘法表?
請問是否有更簡潔的辦法?

lkf 2004-10-24 02:27 PM

<%
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

%>


所有的時間均為GMT +8。 現在的時間是03:28 PM.

vBulletin Version 3.0.1
powered_by_vbulletin 2026。