①2016年3月,李世石与谷歌AlphaGo机器人围棋大战
②在淘宝网中使用拍摄图像进行搜索
③用谷歌地图进行导航,用语音交互的方式规划步行路线
④用数码相机拍摄杂志封面,保存为TIF格式的图像文件
⑤用WPS编辑英文文稿,对照其中英文,以人工键入的方式输入中文译文
单击“是(Y)”按钮删除指定记录后,下列操作能恢复被删除记录数据的是( )
执行该算法,当x的值为5时,( )
下列说法正确的是
Dim a(1 to 10)as integer
Pos=-1
i=1
do while i<=10
if i mod 2=0 then a(i)=i*2 else a(i)=i
i=i+1
loop
i=10
do while i>=1
if a(i)=12 then Pos=i
i=i-1
loop
该程序段运行后,变量Pos值是( )
3图
图1
Private Sub Command1_Click()
Dim i as integer, j as integer, c As Integer
Dim n As Long
c = 0
For i = 0 To 99
n = 110800 + i
If ① Then
List1.AddItem Str(n) + " " + "5"
②
End If
Next i
Label2.Caption = "满足条件的数有:" + Str(c) + "组"
End Sub
① ②
程序功能:在文本框Text1中输入课程号,单击“查询”按钮Command1,在列表框List1中显示选修本课程的学生信息。如果没有找到,在列表框中显示“该课程当前无人报名”。按此要求将程序补充完整。
Private Sub command1_click()
Dim xh(1 to 40),xm(1 to 40) As String '学号和姓名的数组
Dim i,num as integer
Dim conn As New ADODB.Connection, rs As New ADODB.Recordset
Dim strSQL As String
conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + App.Path + "\student.accdb" '打开到数据库的链接
conn.Open
strSQL ="select xh,xm from data where '课程=&(Text1.Text) & '" '设置查询的SQL语句
Set rs.ActiveConnection = conn '设置rs的ActiveConnection属性,指定与其关联的数据库链接
rs.Open strSQL '打开记录集,将从表student中读取的结果集保存到记录集rs中
List1.Clear
num=0
Do while not rs.EOF
①
xh(num)=rs.Fields("xh")
xm(num)=rs.Fields("xm")
rs.MoveNext
loop
rs.Close
conn.close
set rs=nothing
set conn=nothing
For i=1 to num
②
Next i
if num=0 then list1.additem("该课程当前无人报名")
End Sub
Const n As Integer = 10 'n为品牌数
Dim a(1 To n) As String '数组a用于存储品牌名称
Dim b(1 To n) As Integer '数组b用于存储销售量
Private Sub Form_Load()
'此过程用于对数组a和数组b进行赋初值,并显示在List1中,代码略
End Sub
Private Sub Command1_Click()
Dim i As Integer, j As Integer, k As Integer, x As Single, y As String
Dim n As Integer
n = 1
For i = 1 To 9
k = i
For j = i+1 To 10
If Then k = j
n=n+1
Next j
If ① Then
x = a(i): a(i) = a(k): a(k) = x
y = b(i): b(i) = b(k): b(k) = y
End If
Next i
For i = 1 To 10
List2.AddItem Str(a(i)) + " " + b(i)
Next i
Label3.Caption = "比较次数为:" + + "次"
End Sub