乘法vb程序怎么写

1.编写VB程序:九九乘法口诀表Private Sub Command1_Click()
Dim i As Integer
Dim j As Integer
For i = 1 To 9 Step 1
Print " ";
For j = 1 To 9
Print i * j;
Print vbTab;
Next j
Print vbTab
Next i
End Sub
Private Sub Form_Load()
Command1.Caption = "Display(&D)"
Command1.Height = 615
Command1.Width = 1200
Command1.Top = 3600
Command1.Left = 8760
Me.BackColor = vbBlack 'Black=黑色
Me.ForeColor = &HFFFF00
Me.FontSize = 15
Me.Caption = "九九乘法表"
End Sub
2.vb 求a与b的乘积 怎么写添加控件:
text1、text2、text3、command1(按钮)
'源代码:(双击按钮控件,写入以下代码)
Private Sub Command1_Click()
a=text1.text
b=text2.text
c=a*b
text3.text= c
End Sub
'双击窗体空白处写入以下代码
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Command1.Caption = "计算"
End Sub
程序运行方法:
在 text1中输入第一个乘数,在 text2 中输入第二个乘数
再单击按钮后
text3 会输出计算结果
【乘法vb程序怎么写】

乘法vb程序怎么写

文章插图