单项选择题

下列程序执行后,变量x的值为( )。
Dim a, b, c, d As Single
Dim x As Single
a=10
b=30
c=400
If b>a Then
d=a:a=b:b=d
End If
If b>c Then
x=b
Else If a>c Then
x=c
Else
x=a
End If

A.10
B.30
C.400
D.430
<上一题 目录 下一题>
热门 试题

单项选择题
在窗体上有一个文本框Text1,Text属性值为空,然后编写如下事件过程:Private Sub Text1_KeyPress(Key Ascii As Integer)Dim str As String, n As Integer str=UCase(Chr(Key Ascii)) n=Len(str) Text1.Text=String(n,str) End Sub 程序运行后,若在文本框中输入单字母“p”,则在文本框Text1中显示的内容为( )。
A.pp
B.pP
C.PP
D.Pp
单项选择题
在窗本上放置一个命令按钮Command1, 并编写下列单击事件的程序: Option Base 1 Private Sub Command1_Click() Dim c As Integer, d As Integer d=0 c=6 X=Array(2, 4, 6, 8, 10, 12) For i=1 To 6 If X(i)>c Then d=d+X(i) c=X(i) Else d=d-c End If Next i Print d End Sub
A.10
B.12
C.16
D.20
相关试题
  • 窗体上有两个文本框Text1、Text2以及一个...
  • 下列程序的功能是:调用字体对话框来设置文...
  • 在窗体上画4个文本框,并用这4个文本框建...