有如下VB程序段: For i=2 to 5 For j=i to 5 If j mod i=0 then a(j)=a(j)+1 Next j Next i For i=1 to 5 If a (i)<>1 then s=str(i)+s Next i 若數組a 的初始值都為0,則運行該程序段后,s的值為( )
3.【加試題】小丫覺得回文字符串太優美了(回文字符串是指順讀和倒讀都一樣的字符串,如“123321”),為此編寫了VB 程序。程序運行時,單擊按鈕Command1 后,根據文本框Text1 中輸入的內容判斷并輸出是不是回文串。實現上述功能的VB 代碼如下。 Private Sub Command1_Click( ) Dim s As String,f As Boolean,L As Integer s=Text1.Text j=Len(s) i=1 Do while ① i=i+1 j=j-1 Loop If ②Then Print“是回文串“Else Print“不是回文串“ End Sub 在畫線處填入合適代碼,使程序能正常運行。 ①