①使用“应用分身”功能,实现一台手机登录两个微信帐号
②使用“多屏协同”功能,实现电脑端操作手机
③使用“人脸识别”功能,实现屏幕解锁
④使用“手写识别”功能,实现输入文字
⑤使用“运动健康”功能,记录用户运动步数
⑥使用“语音助手”功能,回应用户提出的需求
For i = 1 To n - 1
For j = n To i + 1 Step -1
If a(j) > a(j - 1) Then
k = a(j): a(j) = a(j - 1): a(j - 1) = k
End If
Next j
Next i
s1 = Text1.Text
s2 = ""
For i = 1 To Len(s1)
c = Mid(s1, i, 1)
If c >= "A" And c <= "Z" Then
c = Chr(Asc(c) + 32)
ElseIf c >= "0" And c <= "9" Then
c = Chr((Asc(c) - Asc("0") + 2) Mod 10 + Asc("0"))
End If
s2 = c + s2
Next i
Text2.Text = s2
该程序段运行后,若在文本框Text1中输入“A19bCD”,则文本框Text2中显示的内容是( )
s = Text2.Text
i = 1: k = 0: x = 0
Do While i <= Len(s)
c = Mid(s, i, 1)
If c >= "a" And c <= "z" Then
k = k + 1
Else
If word = Text1.Text Then x = x + 1
End If
i = i + 1
Loop
Text3.Text = Str(x)
加框处①、②应填入的代码为( )
Dim a(1 To 10) As Integer
a(1) = 20: a(2) = 19: a(3) = 17: a(4) = 15: a(5) = 15
a(6) = 15: a(7) = 16: a(8) = 20: a(9) = 25: a(10) = 27
L = 1: R = 10
Do While L <= R
m = (L + R) \ 2
If a(m) > a(m - 1) Then
R = m - 1
Else
L = m + 1
End If
Loop
Text1.Text = Str(R)
该程序段运行后,文本框Text1中显示的内容是( )
(提示:SUMIF函数用于统计某个区域中满足条件的单元格数值之和,例=SUMIF(B3:B22,H3,D3:D22),用于统计2017年各专业男生人数之和)
如字符串“ABDAC”与字符串“AABCD”可以归为同一类,与“AABBC”不可以归为同一类。图图编写了一VB程序,功能如下:在文本框Text1中输入字符串s1,在文本框Text2中输入字符串s2,单击“判断”按钮Command1,在标签Label1中显示是否可以归为同一类的结果。部分运行界面如图所示。
请回答下列问题:
Private Sub Command1_Click()
Dim a(1 To 100) As Boolean
Dim i As Integer, j As Integer
Dim flag As Boolean
s1 = Text1.Text
s2 = Text2.Text
flag = True
For i = 1 To Len(s2)
Next i
If Len(s1) <> Len(s2) Then
flag = False
Else
For i = 1 To Len(s1)
c =
j = 1
Do While j <= Len(s2)
If Then
a(j) = False
Exit Do
End If
Loop
If j = Len(s2) + 1 Then flag = False
Next i
End If
If flag Then
Label1.Caption = "可以归为同一类"
Else
Label1.Caption = "不可归为同一类"
End If
End Sub
请回答下列问题:
Dim a(1 To 100) As Integer
Dim n As Integer
Private Sub Command1_Click()
Dim i As Integer, j As Integer
Dim s As String, k As Integer
n = Val(Text1.Text)
For i = 1 To n
For j = 1 To n
k = (i - 1) * n + j
a(k) = Int(Rnd() * 45 + 5) * 2
s = s + " " + Str(a(k))
Next j
List1.AddItem s
Next i
End Sub
Private Sub Command2_Click()
Dim i As Integer, L As Integer, R As Integer
Dim f As Integer
For i = 1 To n
If i Mod 2 = 1 Then f = 1 Else f = -1
R = i * n
List2.AddItem sort(L, R, f)
Next i
End Sub
Function sort(left As Integer, right As Integer, order As Integer) As String
Dim i As Integer, j As Integer, k As Integer
Dim s As String, t As Integer
s = ""
For i = left To right - 1
k = i
For j = i + 1 To right
If Then k = j
Next j
If k <> i Then
t = a(k): a(k) = a(i): a(i) = t
End If
s = s + " " + Str(a(i))
Next i
sort = s
End Function