• 2022-06-12
    下列程序段的运行结果是 。 Subsele() Dim n As Integer i=21:n=3 Do While i>n i=i-n Loop Print i End Sub
    A: 2
    B: 4
    C: 5
    D: 3
  • D

    内容

    • 0

      下列程序段的执行结果为_____。 Dim M(10),N(10) I=3 for T=1 To 5 M(T)=T N(I)=2*I+T Next T print N(I);M(I)

    • 1

      窗体上有一个名为Command1的命令按钮,编写如下事件过程: Private Sub Command1_Click() i = 0 Do While i < 8 For j = 1 To i n = n + 1 Next i = i + 1 Loop Print n End Sub 运行程序,单击命令按钮,则输出结果是______。

    • 2

      下列程序段的执行结果为( )。 Dim m(10),n(10) I=3 For I=1 to 5 M(t)=t N(I)=2*I+t Next t Print n(I);m(I) A: 3 11 B: 3 15 C: 11 3 D: 15 3

    • 3

      以下程序的运行结果是 Sub s1(b() As Integer) For i = 1 To 4 b(i) = 2 * i Next i End Sub Private Sub Command1_Click() Dim a(1 To 4) As Integer For i = 1 To 4 a(i) = i + 5 Next i s1 a() For i = 1 To 4 Print a(i) Next i End Sub

    • 4

      下面程序段执行后,n的值是()。inti,n=0;for(i=2;i<5;i++){do{if(i%3)continue;n++;}while(!i);n++;} A: 4 B: 5 C: 2 D: 3