题型:综合题 题类:常考题 难易度:普通
浙江省临海市白云高级中学2019届高三下学期信息技术3月月考试卷
Private Sub Cmd1_Click()
Dim a1 As String, a2 As String, sum As String, t As String
Dim b1 As Integer, b2 As Integer
Dim dist As Integer, x As Integer, jw As Integer
a1 = Text1.Text: a2 = Text2.Text: sum = ""
dist = Len(a1) - Len(a2)
If dist < 0 Then
t = a1: a1 = a2: a2 = t
End If
For i = 1 To dist
a2 = "0" + a2
Next i
jw = 0
For i =
If Mid(a1, i, 1) >= "A" And Mid(a1, i, 1) <= "F" Then
b1 = Asc(a1) - 55
Else
b1 = Val(Mid(a1, i, 1))
End If
If Mid(a2, i, 1) >= "A" And Mid(a2, i, 1) <= "F" Then
b2 = Asc(a2) - 55
Else
b2 = Val(Mid(a2, i, 1))
End If
x = b1 + b2 + jw
jw = x \ 16
If Then
sum = Chr(x Mod 16 + 55) + sum
Else
sum = Str(x Mod 16) + sum
End If
Next i
Text3.Text = sum
End Sub
试题篮