展开全部
vb中输出九九乘法表,可以参考下面的代码:
Private Sub Form_Click()
For a = 1 To 9
For b = 1 To a
Print b; "*"; a; "="; b * a;
Next b
Next a
End Sub
扩展资料:
VB基本函数列举:
CBool 函数: 返回已被转换为 Boolean 子类型的变体的表达式。
CByte 函数: 返回已被转换为字节子类型的变体的表达式。
CCur 函数 :返回已被转换为货币子类型的变体的表达式。
CDate 函数: 返回已被转换为日期子类型的变体的表达式。
CDbl 函数: 返回已被转换为双精度子类型的变体的表达式。
Chr 函数: 返回指定 ANSI 字符码的字符。
参考资料来源:百度百科-Visual Basic
展开全部
Private Sub Command1_Click()
Dim i, j, s
For i = 1 To 9
For j = 1 To i
s = s & j & "×" & i & "=" & IIf(Len(i * j) < 2, i * j & " ", i * j) & " "
Next
s = s & vbCrLf
Next
Print s
End Sub
Dim i, j, s
For i = 1 To 9
For j = 1 To i
s = s & j & "×" & i & "=" & IIf(Len(i * j) < 2, i * j & " ", i * j) & " "
Next
s = s & vbCrLf
Next
Print s
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_click()
For a = 1 To 9
For b = 1 To a
Print b; "*"; a; "="; b * a;
Next b
Print
Next a
End Sub
For a = 1 To 9
For b = 1 To a
Print b; "*"; a; "="; b * a;
Next b
Next a
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_click()
For a = 1 To 9
For b = 1 To a
Print b; "*"; a; "="; b * a;
Next b
Print
Next a
End Sub
Private Sub Form_Load()
Me.AutoRedraw = True
Cls
For j = 1 To 9
For k = 1 To 9
If k > j Then Exit For
Print k & "*" & j & "=" & j * k; " ";
Next k
Print
Next j
End Sub
Private Sub Form_Click()
Dim i, j As Integer
For i = 1 To 9
For j = i To 9
Line (i * 200, j * 250)-(i * 200, j * 250)
ForeColor = i * j * 253
Print Space((i - 1) * 6); i & "×" & j & "=" & i * j
Next j
Next i
End Sub
For a = 1 To 9
For b = 1 To a
Print b; "*"; a; "="; b * a;
Next b
Next a
End Sub
Private Sub Form_Load()
Me.AutoRedraw = True
Cls
For j = 1 To 9
For k = 1 To 9
If k > j Then Exit For
Print k & "*" & j & "=" & j * k; " ";
Next k
Next j
End Sub
Private Sub Form_Click()
Dim i, j As Integer
For i = 1 To 9
For j = i To 9
Line (i * 200, j * 250)-(i * 200, j * 250)
ForeColor = i * j * 253
Print Space((i - 1) * 6); i & "×" & j & "=" & i * j
Next j
Next i
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询