下列程序执行后,变量a的值为______。 Dim a,b,c,d As Single a=10:b=20:c=40 If b>a Then d=a:a=b:b=d End If If c>a Then d=a:a=c:c=d End If If c>b Then d=b:b=c:c=d End If
A: 10
B: 40
C: 20
D: 100
A: 10
B: 40
C: 20
D: 100
举一反三
- 下列程序执行后,变量a的值为______。 dim a, b, c, d as single a=100 b=20 c=1000 if b>a then d=a: a=b: b=d end if if c>a then d=a: a=c: c: d end if if c>b then d=b: b=c: c=d end if A: 0 B: 1000 C: 20 D: 100
- 下列程序执行后,变量x的值为______。 Dim a, b, c, d As Single Dim x As Single a=100 b=20 c=1000 If b>a Then d=a: a=b: b=d End If If b>c Then x=b Elseif a>c then x=c Else x=a End If A: 100 B: 20 C: 1000 D: 0
- 下列程序执行后,变量x的值为( )。 Private Sub command1_click() Dim a, b, c, d As Single Dim x As Single a = 100: b = 20: c = 1000 If b > a Then d = a: a = b: b = d End If If b > c Then x = b ElseIf a > c Then x = c Else x = a End If End Sub
- 下列程序执行后,变量x的值为( )。 Dim a,b,c,d As Single Dim x As Single a=100 b=20 c=1000 If b>a Then d=a:a=b:b=d End If If b>c Then x=b Elseif a>c Then x=c Else x=a End If A: A) 100 B: B) 20 C: C) 1000 D: D) 0
- 运行以下程序时,由键盘为变量load输入的数据为20,输出结果为______。 Private Function Wei(load As Integer),Money As Single If load<20 Then Money=load/2 Else Money=20+load End if Wei=Money End Function Private Sub Form _Click() Dim load As Integer,fee As Single load=InputBox(“请输入一个数:”) fee=Wei(loaD) Print fee End Sub A: 10 B: 20 C: 30 D: 40