题型:综合题 题类:常考题 难易度:困难
浙江省杭西高2019-2020学年高二下学期信息技术6月月考试卷
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
If Then
sum=Chr(x Mod 16+55)+sum
Else
sum=Str(x Mod 16)+sum
End If
Next i
If jw=1 Then sum="1"+sum
Text3. Text=sum
End Sub
试题篮