- 基础理论
- 数据及数据库技术
- 人工智能
- 算法理论
- 程序设计语言
- 循环结构
- 分支结构
- 顺序结构
- 类、对象、属性、方法、事件和事件处理的概念
- VB应用程序的界面设计与调试
- 基本数据类型
- 常量、变量、数组
- 常用的标准函数
- + 基本运算及表达式
- 赋值语句
- 选择语句
- 循环语句
- 多媒体理论
- 基础软件操作
- 算法软件操作
- 多媒体软件操作
- 网络技术应用
能完全正确表示“year是闰年”的逻辑表达式是( )
A.year mod 4 = 0 |
B.year mod 400 = 0 |
C.(year mod 400 = 0) or (year mod 4 = 0) and (year mod 100 <> 0) |
D.(year mod 400 = 0) and (year mod 4 = 0) or (year mod 100 <> 0) |
产生一个在[-10,10]中随机整数的VB表达式是( )
A.Int(Rnd * 11) -11 |
B.Int(Rnd * 20)-10 |
C.Int(Rnd * 21) -11 |
D.Int(Rnd * 21)-10 |
有如下 VB 程序段:
s = 0
For i = 1 To 10
s = s + i Mod 2
Next i
Label1.Caption = Str(s) &“-”& str(i) 该程序段运行后,在标签 Label1 上显示的是( )。
s = 0
For i = 1 To 10
s = s + i Mod 2
Next i
Label1.Caption = Str(s) &“-”& str(i) 该程序段运行后,在标签 Label1 上显示的是( )。
A.5-10 | B.5-11 | C.55-10 | D.1-11 |
将数学表达式
写成VB表达式,正确的是( )

A.log(x)/(a+b) | B.log(x)/a+b |
C.ln(x)/(a+b) | D.ln(x)/a+b |
(加试题)某VB程序使用了递归函数,代码如下:
Private Sub Command1_Click()
Text1.Text = f(3)
End Sub
Function f(x As Integer) As String
If x = 1 Then f = 1 Else f = f(x - 1) + 2
End Function
运行程序并点击按钮Command1后,文本框Text1中显示的内容是( )
Private Sub Command1_Click()
Text1.Text = f(3)
End Sub
Function f(x As Integer) As String
If x = 1 Then f = 1 Else f = f(x - 1) + 2
End Function
运行程序并点击按钮Command1后,文本框Text1中显示的内容是( )
A.1 | B.3 | C.5 | D.7 |
在Visual Basic中,若x表示能被5整除的正整数,则下列逻辑表达式的值一定为真的是( )
A.x / 5=0 | B.x Mod 5=0 | C.Int(x\5)=0 | D.5 Mod x=0 |
数学表达式“2n-1>0且2n-1≠1”对应的Visual Basic表达式是( )
A.2·n-1>0 And 2·n-1<>1 | B.2*n>1 And Not(2*n-1=1) |
C.2n-1>0 And 2n-1 ≠ 1 | D.2*n-1>0 And 2n-1<>1 |
若整型变量a的值为2,b的值为3,则下列程序段执行后整型变量c的值为( )。
if a>5 then
if b<4 then c=a-b else c=b-a
else
if b>3 then c=a*b else c=a mod b
end if
if a>5 then
if b<4 then c=a-b else c=b-a
else
if b>3 then c=a*b else c=a mod b
end if
A.2 | B.-1 | C.1 | D.6 |