下列说法正确的是( )
下列说法正确的是 ( )
① x mod 7=0 ② x\7=0 ③ Int(x/7)=x/7 ④ x/7=x\7
s1 = Text1.Text: s2 = Text2.Text
i = 1: j = 1
Do While i <= Len(s1) And j <= Len(s2)
If Mid(s1, i, 1) = Mid(s2, j, 1) Then
Loop
If Then Label1.Caption = "是子串" Else Label1.Caption = "不是子串"
方框处的可选语句为:
①i = i + 1 ②j = j + 1 ③i > Len(s2) ④j > Len(s2)
以下选项正确的是( )
n = Len(s)
For i = 1 To n \ 2
If Mid(s, i, 1) > Mid(s, n - i + 1, 1) Then s1 = s1 + Mid(s, i, 1)
Else
s1 = Mid(s, n - i + 1, 1) + s1
End If
Next i
Text1.Text = s1
执行该程序后,在文本框Text1中显示的是 ( )
i=1: j=n
Do While i<=j
m=(i +j)\2
If Then
i= m+1
j=m- 1
EndIf
Text1.Text=
若要实现上述功能,方框处的代码应是( )
图a
编写如下VB程序,实现上述功能。运行程序,在文本框Text1中输入随机数列“19,21,3,5,18,18,18,23,25,10,11,12,17,17,7”,单击“统计”按钮,在文本框Text2中输出5。
程序运行界面如图所示。