设执行以下程序段时依次输入2,4,6执行结果为 Dim a(4) As Integer,b(4) As Integer For k =0 To 2 a(k + 1) = Val(InputBox( "Enter data:" ) ) b(3 - k) =a(k + 1) Next Print b(k)A.2B.4C.6D.0
设执行以下程序段时依次输入2,4,6执行结果为 Dim a(4) As Integer,b(4) As Integer For k =0 To 2 a(k + 1) = Val(InputBox( "Enter data:" ) ) b(3 - k) =a(k + 1) Next Print b(k)
A.2
B.4
C.6
D.0
相关考题:
以下程序的执行结果是______ includevoid func(int); void main(){ int k=4 func(k) 以下程序的执行结果是______include<iostream.h>void func(int);void main(){int k=4func(k) ;func(k) :cout<<end1;}void func(int a){static int m=0;m+=a;cout<<m<<" ";}
有以下程序段: int k=0,a=1,b=2,c=3; k=ac?c:k; 执行该程序段后,k的值是 有以下程序段: int k=0,a=1,b=2,c=3; k=a<b?b:a; k=k>c?c:k; 执行该程序段后,k的值是 ______。A.3B.2C.1D.0
执行下列程序段时,分别在输入框中输入2、4、6,则执行结果是______。 Dim A(4) As Integer Dim B(4) As Integer For i = 0 To 2 A(i + 1) = Val (InputBox (“请输入数据”)) B(3 - i) = A(i + 1) Next i Print B(i)A.2B.4C.6D.8
设执行以下程序段时依次输入1、3、5,执行结果为______ 。 Dim a(4)As Integer Dim b(4) As Integer For K=0 To 2 a(K+1)=Val(1nputBox(“请输入数据:”)) b(3-K)=a(K+1) Next K Print b(K)A.1B.3C.5D.0
设执行以下程序段时依次输入2,4,6,执行结果为Dim a(4)As IntegerDim b(4)AS IntegerFor k=0 To 2a(k+1)=Val(InputBox("Enter data:"))b(3 - k) =a(k + 1)Next kPrint b(k)A.2B.4C.6D.0
下面程序段执行后的输出结果是()。 int a[]={2,4,6,8,10,12,14,16,18,20,22,24},*q[4],k; for (k=0; k<4; k++) q[k]=a[k*3]; printf("%d",q[3][0]);A.8B.16C.20D.输出不合法
6、程序段如下: int k=0; while(k<=2) k++; printf("%d\n",k); 则执行该程序段的输出结果是() 。A.4B.3C.2D.0