两个一位数相乘
2016-04-14 17:08
211 查看
Private Sub Command1_Click()
Cls
Dim n1 As Byte, n1len As Long
Dim n2 As Byte, n2len As Long
Dim yushu As Byte
Dim shang As Byte
Dim tempResult As Byte
n1 = Int(Val(Me.Text1.Text))
n2 = Int(Val(Me.Text2.Text))
tempResult = n1 * n2
yushu = tempResult Mod 10
shang = tempResult \ 10
Print shang & yushu
Cls
Dim n1 As Byte, n1len As Long
Dim n2 As Byte, n2len As Long
Dim yushu As Byte
Dim shang As Byte
Dim tempResult As Byte
n1 = Int(Val(Me.Text1.Text))
n2 = Int(Val(Me.Text2.Text))
tempResult = n1 * n2
yushu = tempResult Mod 10
shang = tempResult \ 10
Print shang & yushu