For j = 1 To i ‘每行派悔卖i列
Text1.Text = Text1 + Str(i * j)
Next j
Text1.Text = Text1.Text + vbCrLf '每行后加一回车
Next i
右上部分的:Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim se$, i%, j%
Label1.Text = Space(35) &"九九乘法表" &vbCrLf
Label1.Text &= Space(35) &"_________" &vbCrLf
For i = 1 To 9
For j = 1 To 9
If j >= i Then
se = i &"×" &j &"="让握吵 &i * j
Label1.Text &= se &Space(8 - Len(se))
Else
se = ""
Label1.Text &= se &Space(9 - Len(se))
End If
Next j
Label1.Text &= vbCrLf
Next i
End Sub
左下部分的:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim se$, i%, j%
Label1.Text = Space(35) &"坦侍皮冲九九乘法表" &vbCrLf
Label1.Text &= Space(35) &"_________" &vbCrLf
For i = 1 To 9
For j = 1 To i
se = i &"×" &j &"=" &i * j
Label1.Text &= se &Space(8 - Len(se))
Next j
Label1.Text &= vbCrLf
Next i
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)