如何用VB设计99乘法表呈倒三角
我这样写:PrivateSubForm_click()DimbkAsStringPrintTab(35);"九九乘法表"Fori=1To9Forj=1To9bk=i&"x...
我这样写:Private Sub Form_click()
Dim bk As String
Print Tab(35); "九九乘法表"
For i = 1 To 9
For j = 1 To 9
bk = i & "x" & j & "=" & i * j
Print Tab(i * j); bk;
Next j
Print
Next i
End Sub
我是想让乘法表呈倒三角显示,关键在 Print Tab(i * j); bk;不知道如何写。求正解。。 展开
Dim bk As String
Print Tab(35); "九九乘法表"
For i = 1 To 9
For j = 1 To 9
bk = i & "x" & j & "=" & i * j
Print Tab(i * j); bk;
Next j
Next i
End Sub
我是想让乘法表呈倒三角显示,关键在 Print Tab(i * j); bk;不知道如何写。求正解。。 展开
展开全部
'左倒三角
Private Sub Command1_Click()
Dim bk As String
Print Tab(35); "九九乘法表"
For j = 1 To 9
For i = j To 9
Print vbTab;
bk = i & "x" & j & "=" & i * j
Print bk;
Next i
Print
Next j
End Sub
'右倒三脚
Private Sub Command2_Click()
Dim bk As String
Print Tab(35); "九九乘法表"
For j = 1 To 9
For i = j To 9
Print vbTab;
bk = i & "x" & j & "=" & i * j
Print bk;
Next i
Print
For i = 0 To j - 1
Print vbTab;
Next i
Next j
End Sub
Private Sub Command1_Click()
Dim bk As String
Print Tab(35); "九九乘法表"
For j = 1 To 9
For i = j To 9
Print vbTab;
bk = i & "x" & j & "=" & i * j
Print bk;
Next i
Next j
End Sub
'右倒三脚
Private Sub Command2_Click()
Dim bk As String
Print Tab(35); "九九乘法表"
For j = 1 To 9
For i = j To 9
Print vbTab;
bk = i & "x" & j & "=" & i * j
Print bk;
Next i
For i = 0 To j - 1
Print vbTab;
Next i
Next j
End Sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |