则下列说法正确的是:( )
基本参数 | 适用类型:台式机 CPU系列:酷睿i5 4570 包装形式:盒装 |
CPU频率 | CPU主频:3.2GHz 动态超频最高频率:3.6GHz 外频:100MHz |
CPU插槽 | 插槽类型:LGA 1150 针脚数目:1150pin |
CPU内核 | 核心代号:haswell 核心数量:四核心 线程数:四线程 制作工艺:22纳米 热设计功耗(TDP):84W |
CPU缓存 | 三级缓存:6MB |
技术参数 | 内存控制器:双通道DDR3 1333/1600 64位处理器:是 Turbo Boost技术:支持 |
以下说法错误的是:( )
软件 | |||||
PhotoShop CS5 | Word 2010 | Access 2010 | 会声会影 | Flash CS3 | |
对应文件 | |||||
① | ② | ③ | ④ | ⑤ |
①增加前10秒音频音量2dB
②将右声道设置为静音
③删除声音后5秒的音频
④保存处理后的音频文件
则处理后的音频文件与原文件的存储容量之比约为:
图2
图3
Private Sub Command1_Click()
Dim ch As String, pos As Integer
= Text1.Text
pos = Asc(ch) – 64
Label2.Caption = "第" + Str(pos) + "个字母"
End Sub
①执行菜单命令【编辑】→【变换】→【水平翻转】
②复制“右灯笼”图层,得到一个新的图层,重命名为“左灯笼”
③将翻转后的新图像移动左上角适当位置
④选择“左灯笼”为当前层
请写出正确的操作步骤次序。
图1
图2
Private Sub Command1_Click()
Dim a(1 To 4) As Integer
Dim i As Integer
a(1) = 1
For i = 2 To 4
a(i) = 2 * a(i - 1) + 1
Next i
List1.AddItem Str(a(i))
End Sub
Private Sub Command1_Click()
Dim y As Integer
y = Val(Text1.Text)
Label1.Caption = Str(f(y))
End Sub
Function f(n As Integer) As Integer
If (n = 1) Or (n = 2) Then
f = 1
Else
f = f(n - 1) + f(n - 2)
End If
End Function
程序运行时,在文本框中输入8,单击命令按钮Command1后,Label1中显示的内容是:
Private Sub Command1_Click()
Dim i As Integer, c As Integer, n As Integer
c = 0: n = 10
For i = 1 To 10 Step 2
If n Mod i = 0 Then
c = c * i
Else
c = c + i
End If
Next i
Text1.Text = Str(c)
End Sub
第一步:设两数为a、b,且令a>b;
第二步:a÷b,令r为所得余数,若r=0,算法结束,b 即为最大公约数;若r>0则a←b,b←r,并返回第二步;
第三步: 即为 约分后的最简形式。
编写VB程序,程序运行界面如图1所示,请根据算法将下列程序补充完整。
Private Sub Command1_Click()
Dim a As Integer, b As Integer, r As Integer 'a、b为分子和分母,r为最大公约数
a = Val(Text1.Text)
b = Val(Text2.Text)
If b = 0 Then c = MsgBox("分母不能为0"): Exit Sub
'如果分母为0,则提示“分母不能为0”并退出该过程
r =
Text3.Text = Str(a / r)
Text4.Text = Str(b / r)
End Sub
Function gys(ByVal m As Integer, ByVal n As Integer) As Integer
'gys函数用于求最大公约数
Dim s As Integer
If m < n Then
t = m: m = n: n = t
End If
Do While n <> 0
s = m Mod n
m = n
n = s
Loop
End Function
VB程序运行界面如图2所示,在文本框Text1中输入查询的等级,单击“查询”按钮Command1,在列表框List1中显示所有该等级的学生学号和姓名,并按照学号从小到大排序,并在标签Label2处显示学生的人数,如果人数为0,则在列表框中显示“没有该等级的学生”。按此要求编写程序如下,但加框处代码有错误,请改正。
Private Sub Command1_Click()
Dim stuna(1 To 100) As String '存放学生姓名的数组定义为stuna
Dim stunum(1 To 100) As String '存放学生学号的数组定义为stunum
Dim i As Integer, j As Integer, n As Integer
Dim t As String
'连接数据库
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strSQL As String
cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + App.Path + "\stugrade.accdb"
cn.Open
strSQL = "select * from Chinese where 语文等级='" + Text1.Text + "'"
Set rs.ActiveConnection = cn
rs.Open strSQL
n = 0
Do While Not rs.EOF
n = n + 1
stuna(n) = rs.Fields("姓名").Value
stunum(n) = rs.Fields("学号").Value
rs.NextMove '①
Loop
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
List1.Clear '清除列表框
If n = 0 Then
List1.AddItem "没有该等级的学生"
Else
For i = 1 To n - 1 '按姓名排序
For j = n To i + 1 Step -1
If stuna(j) < stuna(j - 1) Then '②
t = stunum(j): stunum(j) = stunum(j - 1): stunum(j - 1) = t
t = stuna(j): stuna(j) = stuna(j - 1): stuna(j - 1) = t
End If
Next j
Next i
For i = 1 To n
List1.AddItem stunum(i) + " " + stuna(i)
Next i
Label2.Caption = "该等级的学生共有" + Str(n) + "名"
End If
End Sub