事例:我们在家里观看春节联欢晚会。

x=3.772
y=-8
x=int(x)+abs(y)
y=x+y
x=x-y
print(x)
Function res(x As Integer,y As Integer,z As Integer)As Integer
Dim temp As Integer
If x>y Then temp=y Else temp=x
If temp>z Then temp=z
res=temp
End Function
Private Sub Command1_Click()
Dim a As Integer,b As Integer,c As Integer
a=5:b=3:c=7
Text1.Text=Str(res(a,b,c))
End Sub
程序运行时,单击命令按钮Command1后,在文本框Text1中显示的内容是( )

Private Sub Command1_Click ( )
Dim a As Integer
Dim b As Integer
Dim C As Integer
a = Val ( Text1.Text )
b = Val ( Text2.Text )
c= a+b^2
Text3.Text = Str(c)
End Sub
程序运行时,单击命令按钮Command1后弹出如图所示的错误信息提示。出现错误的原因是( )


实现上述功能的VB程序如下,请回答下列问题:
Dim num As Integer ‘变量num存储数据库实际的记录数
Dim book(1 to 5 000)As String
Dim content(1 To 5 000)As String,content1(1 To 5 000)As String ‘存储类别内容
Dim sales(1 To 5 000)As Long,sales1(1 To 5 000)As Long ‘存储销售量
Private Sub Form Load( )
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&"\major. accdb"
conn. Open
strSQL="SEl.ECT*FROM count"
Set rs.ActiveConnection=conn
‘从数据表中读取图书类别、类别内容、销售量分别存储到数组book、content、sales中
‘数据库实际读取的记录数存储在变量num中
‘代码略
End Sub
Private Sub Command1_Click()
Dim m As String,n As String,c As Integer,s As Long
Dim i As Integer,j As Integer,k As Integer
List1.Clear
c=0:s=0
m=Text1.Text
For i=l To num ‘将符合的类别内容、销售量重新存储到数组content1、sales1中
If m=book(i)Then
c=c+1
content1(c)=content(i)
sales1(c)=sales(i)
‘①
EndIf
Next i

For i=1 To ‘②
List1.AddItem content1(i)&" "&Str(sales1(i))
Next i
Text2.Text=Str(s)
End Sub
①②