题型:综合题 题类:常考题 难易度:普通
浙江省高中信息技术 解析算法及程序实现同步练习
Private Sub Command1_Click()
Dim i As Integer, n As Integer, dec As Integer
Dim ch As String, s As String
dec=0
For i=1 To Len(s)
ch=Mid(s, i, 1)
If then
n=Asc(ch)-Asc("A")+10
Else
n=Val(Mid(s, i, 1))
End If
dec=dec+n * 16 ^ (Len(s)-i)
Next i
Text2.Text=str(dec)
End Sub
试题篮