17.運(yùn)行下列VB程序,在文本框Text1中輸入15,界面如圖所示。 Private Sub Command1_Click ( ) Const x=“轉(zhuǎn)換成八進(jìn)制數(shù)為” Dim y As Integer‘用于存儲(chǔ)輸入的十進(jìn)制自然數(shù) Dim s As String‘用于存儲(chǔ)轉(zhuǎn)換后的結(jié)果 Dim r As Integer y=Val(Text1.Text) s=“” Do While y<>0‘采用除八取余法 r=y Mod 8 s=Str(r)+s y=y\8 Loop Label1.Caption=Text1.Text+x Text2.Text=s End Sub 單擊“開始”按鈕Command1后,標(biāo)簽Label1中顯示的內(nèi)容是
屬性值設(shè)置為“可能的密碼有:”。 (2)為實(shí)現(xiàn)上述功能,請(qǐng)?jiān)跈M線處填入合適的選項(xiàng)。 Private Sub Command1_Click ( ) Dim x As Integer,s As Long,y As Integer,i As Integer For i=0To 9999 s=590000+i If
Then x=s mod 10 y=(s Mod 100)\10 If
Then List1.AddItem
End If End If Next i End Sub 劃線②、③的選項(xiàng): A.x=y B.Str(s) C.Str(i) D.s Mod 12=0and s Mod 38=0