16.在窗體上畫一個命令按鈕Command1,然后編寫如下代碼: Private Sub Command1_Click ( ) Dim arr1(10),arr2(10)As Integer n=3 For i=1 To 5 arr1(n)=i arr2(i)=2*arr1(n)+1 Next i Print arr1(n),arr2(n); End Sub 程序運行后,單擊命令按鈕,輸出結(jié)果是
Private Sub Command1_Click ( ) Dim s As Integer,imax As Integer,pimax As Integer,t As Integer Dim source As String source=Text1.Text s=Len(source) imax=1 pimax=1 t=0 For i=1To s d=
If?。╠>=“a”And d<=“z”) Or?。╠>=“A”And d<=“Z”) Then
Else If t>=imax Then imax=t
End If t=0 End If Next i Label3.Caption=Mid(source,pimax,imax) Label5.Caption=imax Label7.Caption=