[填空題] 這是一個解密程序。密碼由若干數(shù)字組成,每三位為一個數(shù)字組,若數(shù)字組中所有數(shù)字均小于5,則該數(shù)字組有效,將有效的數(shù)字組按5進制轉(zhuǎn)換成10進制數(shù),再按A
[填空題] 這是一個解密程序。密碼由若干數(shù)字組成,每三位為一個數(shù)字組,若數(shù)字組中所有數(shù)字均小于5,則該數(shù)字組有效,將有效的數(shù)字組按5進制轉(zhuǎn)換成10進制數(shù),再按ASCII代碼轉(zhuǎn)換為字符就可得到明文。 Option Explicit Private Sub Command1_Click()Dim st As String,p As Stringst=Text1Do P=___(22)___ If judge(p) Then Text2=Text2 & Chr(conv(p)) End If st=Right(st,Len(st)-3)Loop Until ___(23)___ End Sub Private Function judge(p As String) As Boolean ’判斷有效數(shù)字組Dim q As String*1,i As IntegerFor i=1 To Len(p) q=Mid(p,i,1) If ___(24)___ Then Exit FunctionNext ijudge=True End Function Private Function conv(p As String)As Integer ’進制轉(zhuǎn)換Dim k As Integer,q As String*1,i As IntegerFor i=Len(p) To 1 Step-1 q=Mid(p,i,1) conv=conv+Val(q)*5^k ___(25)___Next i End FUnction
正確答案:Mid(st,A,C)Len(st)=0q>=”E”K=k+A
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。