①在0CR软件中对识别结果进行校正
②停车管理系统通过拍摄识别车牌号码
③某平台的机器翻译应用
④AlphaGo与李世石的围棋之战
⑤超市扫描条码器扫描商品的条形码
Dim i As Integer, s As Integer
Dim a (1 To 10)As Integer
For i =1 To 10
a(i)=i^2
If a(i)Mod 3=0 And a(i)Mod 5 =0 Then s= 50000+ a(i)
If a(i)Mod 3=0 Or a(i) Mod 5 =0 Then s =s+ a(i)
Next i
Text1. Text Str(s)
执行该程序段后,下列说法正确的是( )
Dim n As Integer, i As Integer, a As Integer, b As Integer
Randomize
n=5:i=1
Do While i <=n
a= Int(Rnd*90)+ 10
b= Int(Rnd*90)+ 10
If a>b Then
List1.AddItem Str(a)+"-"+ Str(b)+“=“
i=i+1
End If
Loop
执行该程序段后,下列说法正确的是( )
Dim a(1 To 6)As Integer, I AS Integer, maxi As Integer
a(1)=12:a(2)=8:a(3)=14:a(4)=13:a(5)=12:a(6)=11
Maxi=1
For i=2 To 6
If a(i)>a(maxi)Then maxi=i
Next i
a(1)=a(1)+a(maxi):a(maxi)=a(1)-a(maxi):a(1)=a(1)-a(maxi)
执行该程序段后,数组元素a(1)~a(6)的值是( )
Dim a(1 To 5)As Integer, i As Integer, j As Integer key As Integer
a(1)=8:a(2)=13:a(3)=25:a(4)=98:a(5)=56
For i=4 To 5
j=i: Key a(j)
Do While a(j-1)>Key and j>
a(j)=a(j-1)
j=j-1
Loop
a(j)=Key
Next i
执行该程序段后,数组元素a(1)~a(5)的值是( )
Private Sub Command1_Click()
Dim s As String, rs As String, c As String, i As Integer, flag As Boolean
s= Text1. Text: rs =“”: flag False
For i=1 To Len (s)
c=Mid(s, i, 1)
IfThen
rs=rs +c
ElseIf c=“(”Them
ElseIf c=“)”Then
flag =False
End If
Next i
Text2 Text=rs
End Sub
加密规则如下表所示:
原字 |
A |
B |
C |
… |
X |
Y |
Z |
a |
b |
c |
… |
x |
y |
z |
密字 |
z |
y |
x |
… |
c |
b |
a |
Z |
Y |
X |
… |
C |
B |
A |
注:“A”的ASCⅡ码值是65,“a”的ASCI码值是97。
程序运行界面如图所示
Private sub Cmd1- Click()
Dim i As Integer, s As String, c As String, ans As String
①
For i=1 To Len(s)
c= Mid(s, i, 1)
If c<="z “And c >=”a"Or c<=”Z” And c >=”A” Then
c=②
End If
③
Next i
TxtOut. Text =ans
End Sub
实现上述功能的VB程序如下,请在划线处填入合适的代码。
Private Sub Command1_Click()
Dim i As Integer, d As Integer, r As integer
Dim rs As string, ans1 As Integer, ans2 As Integer
For i=81 To 342
①
rs=“”
Do While d <>0
r = d Mod 9
rs= str(r)+rs
②
Loop
ans1= Val(rs)
‘求出相应的七进制数,存储在变量ans2中,代码略
If ans1 Mod 10=ans2\ 100 And ans1\ 100=ans2 Mod 10 And ③ Then
Text1. Text=④
Text2 Text= Str(ans1)
Text3. Text= Str(ans2)
End If
Next i
End Sub