九九乘法表vb编程初学者代码_用vb编写九九乘法表
2023-06-18 00:56:46
来源互联网 2023-06-18 00:56:46
(资料图片)
1、用VB程序怎么做九九乘法表的步骤如下:创建显示结果的窗体:编写按钮宏Private Sub Command1_Click()Dim a, b As IntegerDim s As String: s = ""For a = 1 To 9For b = 2 To 9s = s & a & "*" & b & "=" & b * aIf b <>9 Then s = s & Space(1) Else s = s & vbNewLineNextNextMsgBox sEnd Sub3.运行结果。
本文到此分享完毕,希望对大家有所帮助。