永发信息网

九九乘法表的编写?

答案:3  悬赏:70  手机版
解决时间 2021-05-20 19:24
  • 提问者网友:温旧梦泪无声
  • 2021-05-19 21:45

Dim a As Integer

Dim b As Integer

Dim c As String

For a = 1 To 9

c = " "

For b = 1 To a

c = c & a & " * " & b & " =" & a * b & vbTab


Next
Print(c)
Next

怎么运行只显示

1*9=9 2*9=18 3*9=27 4*9=36 .........9*9=81 呢?

最佳答案
  • 五星知识达人网友:执傲
  • 2021-05-19 22:00
1,1的一 1 ,2的② 1.3 的3 ···
全部回答
  • 1楼网友:逃夭
  • 2021-05-19 23:53
Private Sub 确定_Click() Dim i As Integer Dim j As Integer Dim str As String Me.AutoRedraw = True For i = 1 To 9 str = "" For j = 1 To 9 str = str & i & "×" & j & " = " str = str & i * j str = str & vbTab Next j Print str Next i End Sub
  • 2楼网友:往事隔山水
  • 2021-05-19 22:13
第二层循环不包含在第一层循环里面
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯