• 2022-05-29 问题

    声明一个变量为局部变量应该用( )。 A: Private Sub Command1 Click() n=5:x=1 Do X=X * I I=I + 1 Loop While I < n Print x End Sub B: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X*I I=I + 1 Loop While I <n Print x End Sub C: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I<=n Print X End Sub D: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I>n Print X End Sub

    声明一个变量为局部变量应该用( )。 A: Private Sub Command1 Click() n=5:x=1 Do X=X * I I=I + 1 Loop While I < n Print x End Sub B: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X*I I=I + 1 Loop While I <n Print x End Sub C: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I<=n Print X End Sub D: Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I>n Print X End Sub

  • 2022-06-27 问题

    下列程序段中没有错误的是______。 A: x=6For k=5 To 1 Step-1x=x+1NextPrint x B: x=10While x>5x=x-1LoopPrint x C: x=10Do While x>5x=x-1End DoPrint x D: X=6Do While x>5x=x+1Loop Until x=10Print x

    下列程序段中没有错误的是______。 A: x=6For k=5 To 1 Step-1x=x+1NextPrint x B: x=10While x>5x=x-1LoopPrint x C: x=10Do While x>5x=x-1End DoPrint x D: X=6Do While x>5x=x+1Loop Until x=10Print x

  • 2022-06-06 问题

    执行下列程序段后,x的值是( ) n=5: x=1 : i=1 Do x=x*i i=i+1 Loop While i<n

    执行下列程序段后,x的值是( ) n=5: x=1 : i=1 Do x=x*i i=i+1 Loop While i<n

  • 2021-04-14 问题

    设有以下的循环: x = 1 Do x = x + 2 Print x Loop Until_____________ 要求程序运行时执行 3次循环体,请填空

    设有以下的循环: x = 1 Do x = x + 2 Print x Loop Until_____________ 要求程序运行时执行 3次循环体,请填空

  • 2022-06-19 问题

    下列程序段的执行结果为______。 x = 0: y = 1 z = 1: n = 0 Do x = x + y + z n = n + 1 Loop While x < 10 Print x; n A: 10 5 B: x n C: 9 5 D: 10 6

    下列程序段的执行结果为______。 x = 0: y = 1 z = 1: n = 0 Do x = x + y + z n = n + 1 Loop While x < 10 Print x; n A: 10 5 B: x n C: 9 5 D: 10 6

  • 2022-06-08 问题

    有如下事件程序,运行该程序后输出结果是。 Private Sub Command33_Click() Dim x As Integer, y As Integer x = 1: y = 0 Do Until y <= 25 y = y + x * x x = x + 1 Loop MsgBox "x=" & x & ", y=" & y End Sub

    有如下事件程序,运行该程序后输出结果是。 Private Sub Command33_Click() Dim x As Integer, y As Integer x = 1: y = 0 Do Until y <= 25 y = y + x * x x = x + 1 Loop MsgBox "x=" & x & ", y=" & y End Sub

  • 2022-06-08 问题

    中国大学MOOC: 下面的程序执行完后a,b的值分别为______。 Dim x, y, a, b As Integer x = 12 : y = 8 a = 1 : b = x * y Do While x Mod 2 = 0 And y Mod 2 = 0 x = x 2 y = y 2 a = a * 2 Loop Do While x <> y If x > y Then x = x - y Else y = y - x End If Loop a = a * x b = b a

    中国大学MOOC: 下面的程序执行完后a,b的值分别为______。 Dim x, y, a, b As Integer x = 12 : y = 8 a = 1 : b = x * y Do While x Mod 2 = 0 And y Mod 2 = 0 x = x 2 y = y 2 a = a * 2 Loop Do While x <> y If x > y Then x = x - y Else y = y - x End If Loop a = a * x b = b a

  • 2022-06-10 问题

    阅读以下Shell程序,它的输出是_____________ #!/bin/sh echo "ok,nice" loop=0 for str in "hello world" do loop=$(($loop+1)) echo "The $loop loop:$str" done A: ok,nice The 2 loop:hello world B: ok,nice The 1 loop:hello world C: The 1 loop:hello world D: ok,nice

    阅读以下Shell程序,它的输出是_____________ #!/bin/sh echo "ok,nice" loop=0 for str in "hello world" do loop=$(($loop+1)) echo "The $loop loop:$str" done A: ok,nice The 2 loop:hello world B: ok,nice The 1 loop:hello world C: The 1 loop:hello world D: ok,nice

  • 2021-04-14 问题

    如果要求下列程序段中的循环执行 3 次,则程序中括号里的条件应是 x = 1 Do x = x + 3 Loop Until ( _______ )

    如果要求下列程序段中的循环执行 3 次,则程序中括号里的条件应是 x = 1 Do x = x + 3 Loop Until ( _______ )

  • 2022-06-08 问题

    编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 1: y = 1 Do y = x * y If y > 10 Then Print x, y Exit Do Else x = x + 3 End If Loop While x <= 10 End Sub 运行程序,输出结果为______

    编写如下程序: Private Sub Command1_Click() Dim x As Integer, y As Integer x = 1: y = 1 Do y = x * y If y > 10 Then Print x, y Exit Do Else x = x + 3 End If Loop While x <= 10 End Sub 运行程序,输出结果为______

  • 1 2 3 4 5 6 7 8 9 10