( 35 )下面程序运行时,若输入 “ Visual Basic Programming ” ,则在窗体上输出的是Private Sub Comand1_Click ()Dim count ( 25 ) As Integer, ch As Stringch=U c ase ( InputBox ( " 请输入字母字符串 " ) )For k=1 To Len ( ch )n=Asc ( Mid ( ch,k,1 ) ) -Asc ( " A " )If n=0 ThenCount ( n ) =Count ( n ) + 1End IfNext km=count ( 0 )For k=1 To 25If mcount ( k ) Thenm=count ( k )End IfNext kPrint mEnd SubA ) 0B ) 1C ) 2D ) 3

( 35 )下面程序运行时,若输入 “ Visual Basic Programming ” ,则在窗体上输出的是

Private Sub Comand1_Click ()

Dim count ( 25 ) As Integer, ch As String

ch=U c ase ( InputBox ( " 请输入字母字符串 " ) )

For k=1 To Len ( ch )

n=Asc ( Mid ( ch,k,1 ) ) -Asc ( " A " )

If n>=0 Then

Count ( n ) =Count ( n ) + 1

End If

Next k

m=count ( 0 )

For k=1 To 25

If m<count ( k ) Then

m=count ( k )

End If

Next k

Print m

End Sub

A ) 0

B ) 1

C ) 2

D ) 3


相关考题:

下面程序运行时,若输入“Visual Basic Programming”。则在窗体上输出的是Prirate Sub Command1_Click()Dim count(25)As Integer,ch As Stringch=UCase(InputBox(”请输入字母字符串”))For k=1 To Len(ch)n=Asc(Mid(ch,k,1))-Asc(”A”)If n=0 Thencount(n)=count(n)+1End IfNext km=count(0)For k=1 T0 25IfIncount(k)ThenIll=count(k)End IfNext kPrint mEnd subA.0B.1C.2D.3

下面程序运行时,若输入395,则输出结果是( )。 A.5 9 3B.3 5 9C.5 3 9S 下面程序运行时,若输入395,则输出结果是( )。A.5 9 3B.3 5 9C.5 3 9D.3 9 5

有下列程序: Option Base 0 Private Sub Command1_Click() Dim City As Variant x = Array("Visual","Basic","Microsoft","Programming") Print x(2) End Sub 程序运行后,单击命令按钮,则在窗体上显示的内容是A.MicrosonB.错误提示C.VisualD.Basic

下面程序运行时,若输入“Visual Basic Programming”,则在面体上输出的是( )。A.3B.2C.1D.0

下面程序运行时,若输入395,则输出结果是( )。A. 5 9 3B. 3 5 9C. 5 3 9D. 3 9 5

下面程序运行时,若输入“Visual Basic Prograrmming”,则在窗体上输出的是( )。Private Sub Command1Click( ) Dim cout(25)As Integer,ch As String ch=Ucase(Int,utBox("请输入字母字符串")) For k=1 To i en(ch). n=ASC(Mid(ch,k,1))-Asc("A") If n=0 Then count(n)=count(n)+1 End If Next k m=count(0) For k=1 To 25 If mcount(k)Then m=count(k) End If Next k Print m End SubA.0B.1C.2D.3

在窗体上画了两个按钮控件Command1和Command2,有如下程序: Private Sub Command1_Click() Print "Visual"; End Sub Private Sub Command2_Click() Print "Basic"; End Sub Private Sub Form_Load() CommandCancel=True Command1.Cancel=True End Sub 执行程序后,按键盘Cancel键,在窗体上输出的结果是A.BasicB.VisualC.CancelD.True

窗体上有一个按钮和一个列表框,执行下列程序后,输出的结果为 Private Sub Command1_Click() List1.AddItem "Visual" List1.AddItem "Basic" List1.AddItem "Programming", 1 Print list1.List(2) End SubA.VisualB.BasicC.ProgrammingD.2

下列程序执行后,按住键,并在文本框中输入“a”,则在窗体上输出结果为()。Private Sub Text1_K 下列程序执行后,按住<Ctrl>键,并在文本框中输入“a”,则在窗体上输出结果为( )。 Private Sub Text1_KeyDown(KeyCode As Integer,Shift As Integer) Print KeyCode,Shift End SubA.a 2B.65 2C.97 1D.97 2