请根据文字描述帮我写三条VBA流程控制语句(关于Access中的VBA流程控制语句
【题目:】无格式显示九九表,每一行显示一条结果,9X9共81行。
【题目:】按矩阵形式显示九九表,9行9列。
【题目:】按左下三角形式显示九九表,9行,列数从1到9变化。 展开
第一题:
Public Sub jiujiubiao()
Dim i As Integer
Dim j As Integer
Dim zfc As String
zfc = ""
For i = 1 To 9
For j = 1 To i
zfc = zfc & i & "*" & j & "=" & i * j & vbCrLf
Next
Next
Debug.Print zfc
End Sub
效果如下:
再回答第二题:
Public Sub jiujiubiao()
Dim i As Integer
Dim j As Integer
Dim zfc As String
zfc = ""
For i = 1 To 9
For j = 1 To 9
zfc = zfc & i & "*" & j & "=" & i * j & ";"
Next
zfc = zfc & vbCrLf
Next
'MsgBox zfc
Debug.Print zfc
End Sub
在回答第三题:
Public Sub jiujiubiao()
Dim i As Integer
Dim j As Integer
Dim zfc As String
zfc = ""
For i = 1 To 9
For j = 1 To i
zfc = zfc & i & "*" & j & "=" & i * j & ";"
Next
zfc = zfc & vbCrLf
Next
'MsgBox zfc
Debug.Print zfc
End Sub
效果如下: