[单选题]

运行下列程序:

Private Sub Form_Click( )

a = 3

t = InputBox("请输入一个整数")

Select Case t

C.ase Is > 0

b = a + l

C.ase Is = 0

b = a + 2

C.ase Else

b = a + 5

E.nd Select

Print a; b

E.nd Sub

从键盘输入5,在窗体上显示的结果是( )。

A.1 5

B.3 3

C.1 1

D.5 5

参考答案与解析:

相关试题

运行下列程序:Private Sub form_Click()t = Val(I

[单选题]运行下列程序:Private Sub form_Click()t = Val(InputBox("请输入一个数:"))x = t - 1Select Case tC.ase 1 To 10y = 4 * tC.ase Is >10y = 3 * tC.ase Elsey = 2 * tE.nd SelectPrint x; yE.nd Sub运行时,从键盘输入4,输出的结果是()。A.3 16B.4 4C.3 4D.4 10

  • 查看答案
  • 运行下列程序:Private Sub form_Click( )For i =

    [单选题]运行下列程序:Private Sub form_Click( )F.or i = 1 To 4t = t * 10 + is = s + tNext iPrint sE.nd Sub单击窗体后,则输出结果是( )。A.1234B.4321C.1370D.4444

  • 查看答案
  • 运行下列程序:Private Sub Form_Click( )For i =

    [单选题]运行下列程序:Private Sub Form_Click( )F.or i = 3 To 1 Step -1F.or j = 2 To 1 Step -1D.ebug.Print "A"; String(3 - i, "*");Next jNext iE.nd Sub单击窗体后,则在立即窗口内显示结果是( )。A.AAA*A**A***B.AAA*A*A**A**C.A*A*A*A*A*A*D.A***

  • 查看答案
  • 运行下列程序:Private Sub form_Click( )For i =

    [单选题]运行下列程序:Private Sub form_Click( )F.or i = 1 To 2x = 1F.or j = 1 To 3x = 5F.or k = 1 To 4x = x + 2Next kNext jNext iPrint xE.nd Sub单击窗体后,则输出结果是( )。A.5B.13C.25D.48

  • 查看答案
  • 运行下列程序:Private Sub Form_Click( )Dim a As

    [单选题]运行下列程序:Private Sub Form_Click( )D.im a As Integera = 1F.or i = 1 To 5C.all fun1(a)Next iPrint aE.nd SubPrivate Sub fun1(x)y = 2D.ox = x + yLoop Until x > 10E.nd Sub单击窗体后,则在窗体上显示的结果是( )。A.5B.1 2 3 4 5C.19D.7

  • 查看答案
  • 运行下列程序:Private Sub Form_Click( )For i =

    [单选题]运行下列程序:Private Sub Form_Click( )F.or i = 1 To 20If fun1(i) Thens = s + 1E.nd IfNext iPrint sE.nd SubPrivate Function fun1(y) As BooleanIf y Mod 2 <> 0 Thenfun1 = FalseE.lsefun1 = TrueE.nd IfE.nd Function单击窗体后,则在窗体上显示的结果是( )。A.110B.10C.0D.20

  • 查看答案
  • 运行下列程序:Private Sub form_Click( )x = Inpu

    [单选题]运行下列程序:Private Sub form_Click( )x = InputBox("请输入一个数:")Select Case xC.ase Is > 0: y = x + 1: x = y + 1C.ase Is = 0: y = x + 2: x = y + 2C.ase Else: y = x + 3: x = y + 3E.nd SelectPrint x; yE.nd Sub从键盘输入1,输出的结果是( )。A.3 2B.2 3C.2 2D.1 4

  • 查看答案
  • 运行下列程序:Private Sub form_Click( )Dim xx =

    [单选题]运行下列程序:Private Sub form_Click( )Dim xx = 0Do While x < 10x = x £« 3LoopMsgBox x运行下列程序:Private Sub form_Click( )D.im xx = 0D.o While x < 10x = x + 3LoopMsgBox xE.nd Sub单击窗体后,则在窗体上显示的结果是( )。A.0B.3C.10D.12

  • 查看答案
  • 运行下列程序:Private Sub form_Click( )s = Inpu

    [单选题]运行下列程序:Private Sub form_Click( )s = InputBox("请输入一个字符A:")Select Case Asc(s)C.ase Is > 65n = String(3, UCase(s))C.ase Is = 65n = String(3, LCase(s))C.ase Elsen = sE.nd SelectPrint nE.nd Sub从键盘输入A,输出的结果是( )。A.aaaB.AAAC.65D.a

  • 查看答案
  • 运行下列程序:Private Sub Form_Click()a = 32: b

    [单选题]运行下列程序:Private Sub Form_Click()a = 32: b = 5D.oa = a / 2b = b + 1Loop While b< 10Print aE.nd Sub单击窗体后,则在窗体上显示的结果是()。A.1B.2C.5D.11

  • 查看答案
  • 运行下列程序:Private Sub Form_Click( )a = 3t =