两位数乘一位数
来源:互联网 发布:ipadair2下载不了软件 编辑:程序博客网 时间:2024/05/16 17:39
Option Base 1
Private Sub Command1_Click()
Me.Font.Size = 70
Dim n1() As Byte, n1Len As Long
Dim n2() As Byte, n2Len As Long
Dim yushu1 As Byte, yushu2 As Byte
Dim shang As Byte
Dim tempResult As Byte
n1Len = Len(Me.Text1.Text)
n2Len = Len(Me.Text2.Text)
ReDim n1(n1Len)
ReDim n2(n2Len)
For i = LBound(n1) To UBound(n1)
n1(i) = Int(Val(Mid(Me.Text1.Text, i, 1)))
Next
For i = LBound(n2) To UBound(n2)
n2(i) = Int(Val(Mid(Me.Text2.Text, i, 1)))
Next
tempResult = n1(2) * n2(1)
yushu1 = tempResult Mod 10
shang = tempResult \ 10
tempResult = n1(1) * n2(1) + shang
yushu2 = tempResult Mod 10
shang = tempResult \ 10
Print shang & yushu2 & yushu1
End Sub
Private Sub Command1_Click()
Me.Font.Size = 70
Dim n1() As Byte, n1Len As Long
Dim n2() As Byte, n2Len As Long
Dim yushu1 As Byte, yushu2 As Byte
Dim shang As Byte
Dim tempResult As Byte
n1Len = Len(Me.Text1.Text)
n2Len = Len(Me.Text2.Text)
ReDim n1(n1Len)
ReDim n2(n2Len)
For i = LBound(n1) To UBound(n1)
n1(i) = Int(Val(Mid(Me.Text1.Text, i, 1)))
Next
For i = LBound(n2) To UBound(n2)
n2(i) = Int(Val(Mid(Me.Text2.Text, i, 1)))
Next
tempResult = n1(2) * n2(1)
yushu1 = tempResult Mod 10
shang = tempResult \ 10
tempResult = n1(1) * n2(1) + shang
yushu2 = tempResult Mod 10
shang = tempResult \ 10
Print shang & yushu2 & yushu1
End Sub
0 0
- 两位数 乘 一位数
- 两位数乘一位数
- 两位数乘一位数
- 两位数乘一位数
- 两位数乘一位数
- 两位数乘一位数
- 两位数乘一位数
- 两位数乘一位数
- 两位数乘一位数
- 余数和商 两位数乘一位数
- Vb两位数乘一位数 电气2012
- 余数和商 两位数乘一位数
- 两位数*一位数
- 两位数*一位数
- 15 电气 齐振昊 VB中两位数乘一位数
- 一位数*一位数和两位数*一位数
- 一位数乘一位数
- 一位数乘一位数
- 三位数乘一位数
- vb中的乘法运算
- 三位数乘以一位数
- http的get和post请求
- 读《CSS.Secrets》,记录下——box-shadow,outline
- 两位数乘一位数
- SourceTree里GitFlow的使用
- 多位数乘一位数
- 唱衰平板何以成风?坚守品质乃长胜之道
- USACO-Section 4.3 Letter Game (枚举)
- Hiveserver2 HA高可用
- OpenCV坐标体系+minMaxLoc的使用细节
- POJ 1523 Tarjan求割点
- stringrequest返回乱码