单选题
VB
题号 #150563
在窗体上画一个命令按钮(其Name属性为Command1) ,然后编写如下代码:
Option Base 1
Private Sub Command1_Click()
Dim a
s=0
a=Array(1,2,3,4) ; j=1
For i=4 To 1 Step-1
s=s+a(i) *j
j=j*10
Next i
Print s
End Sub
运行上面的程序,单击命令按钮,其输出结果是( )。
参考答案
B
答案解析
暂无解析
你可能感兴趣的试题
A.Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii<65 Or KeyAscii>90 Then
MsgBox "请输入大写字母"
KeyAscii=0
End If
End Sub
If KeyAscii<65 Or KeyAscii>90 Then
MsgBox "请输入大写字母"
KeyAscii=0
End If
End Sub
B.Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode <65 Or KeyCode>90 Then
MsgBox "请输入大写字母"
KeyCode=0
End If
End Sub
If KeyCode <65 Or KeyCode>90 Then
MsgBox "请输入大写字母"
KeyCode=0
End If
End Sub
C.Private Sub Text1_MouseDown(Button As Integer,_
Shift As Integer, X As Single, Y As Single)
If Asc(Text1.Text) <65 Or Asc(Text1.Text) >90 Then
MsgBox "请输入大写字母"
End If
End Sub
Shift As Integer, X As Single, Y As Single)
If Asc(Text1.Text) <65 Or Asc(Text1.Text) >90 Then
MsgBox "请输入大写字母"
End If
End Sub
D.Private Sub Text1_Change()
If Asc(Text1.Text) >64 And Asc(Text1.Text) <91 Then
MsgBox "请输入大写字母"
End If
End Sub
If Asc(Text1.Text) >64 And Asc(Text1.Text) <91 Then
MsgBox "请输入大写字母"
End If
End Sub
A.记录类型animal不能在Form1中定义,必须在标准模块中定义
B.如果文件c:\vbTesdat不存在,则Open命令执行失败
C.由于Put命令中没有指明记录号,因此每次都把记录写在文件的末尾
D.语句"Put #1,,rec"将animal类型的两个数据元素写到文件中
A.72 36
B.108 36
C.72 6
D.108 6