把代码补充完整。
Private Sub Command1_Click()
Dim a(1 To 51) As Integer, b(1
To 51) As Integer, c(1
To 51) As Integer Dim lens1 As String, lens2
As String
lens1 = Len(Text1.Text) :lens2
= Len(Text2.Text)
For i = Len(Text1.Text) To 1 Step -1 ‘读取数据,逐位保存在数组中
a(i) = Mid(Text1.Text,
lens1 - i + 1, 1)
Next i
For i = Len(Text2.Text) To 1 Step -1
b(i) = Mid(Text2.Text,
lens2 - i + 1, 1)
Next i
For i = 1 To 51 ‘从个位到高位逐位求和
c(i) =
If c(i) > 9 Then
c(i)
= c(i)
- 10
c(i
+ 1)=
End If Next i
f = False '从左到右输出第一个不为 0 的元素开始从高位到低位输出和
For i = 51 To 1 Step
-1
If c(i) <> 0 Then f
= True
If f Then Text3.Text
= Text3.Text & c(i)
Next i
End Sub