(單選,填字母)。 (2)實(shí)現(xiàn)上述功能的VB程序如下,請(qǐng)?jiān)诋?huà)線處填入合適的代碼。 Private Sub Commandl_Click ( ?。?br />Dim a As Long,h As Long,t As Long,v As Long,ch As Long Dim s As String,x As String,y As String s=″″:t=0:v=0 h=65536+Asc(Text1.Text)'將漢字的十進(jìn)制內(nèi)碼賦值給h Do While h<>0 a=h Mod 2 h=h\2 s=CStr(a)+s Loop x=
y=Mid(s,Len(s)-7,8) For i=Len(x) To 1Step-1 ch=Va10Mid(x,i,1))
Next i
Labe12.Caption=“該漢字的區(qū)位碼為:″+Str(t-160)+″位碼為:″+Str(v-160) End Sub (3)若經(jīng)過(guò)Do While循環(huán)后,s的值為“1010101111001100”,則畫(huà)框處循環(huán)內(nèi)的語(yǔ)句執(zhí)行了
。 (2)實(shí)現(xiàn)上述功能的VB程序如下,請(qǐng)?jiān)跈M線處填入合適代碼。 Const n=1000 Private Sub Commandl_Click ( ?。?br />Dim f (1 To n) As Integer,cq (1 To n) As Integer Dim a (1 To n) As String,s As String,res As String Dim y As Integer,p As Integer,begin As Integer s=Textl.Text:y=Val(Text2.Text) For i=1 To 8 f(i)=1 Next i '計(jì)算出列順序 p=0 For i=1 To 8 j=1 Do While j<=y p=p Mod 8+1 j=
Loop f(p)=0:cq(i)=p Next i For i=1 To Len(s) a(i)=Mid (s,i,1) Next i i=1:begin=-8:res=″″ Do While i<=Len(s) If i Mod 8=1 Then