此文章已于 12:39:44 2016/6/15 发布到 Zero To Hero Vb.net九九乘法表 PublicClassForm1 PrivateSub Button1_Click(sender AsObject, e AsEventArgs) Handles Button1.Click Dim i, j AsInteger Dim se AsString Label1.Text = "" For i = 1 To 9 Step 1 For j = 1 To 9 Step 1 se = i &"x"& j &"="& i * j Label1.Text &= se & Space(10 - Len(se)) Next Label1.Text &= vbCrLf Next EndSub PrivateSub Button2_Click(sender AsObject, e AsEventArgs) Handles Button2.Click Dim i, j AsInteger Dim se AsString Label1.Text = "" For i = 1 To 9 Step 1 For j = 1 To i Step 1 se = i &"x"& j &"="& i * j Label1.Text &= se & Space(10 - Len(se)) Next Label1.Text &= vbCrLf Next EndSub PrivateSub Button3_Click(sender AsObject, e AsEventArgs) Handles Button3.Click Dim i, j AsInteger Dim se AsString Label1.Text = "" For i = 1 To 9 Step 1 For j = i To 9 Step 1 se = i &"x"& j &"="& i * j Label1.Text &= se & Space(10 - Len(se)) Next Label1.Text &= vbCrLf & Space(i * 10) Next EndSub 本文来源:https://www.wddqw.com/doc/9c966fe1a6c30c2258019e69.html