更多"下列程序段的输出结果为______。
Dim S1(5)As In"的相关试题:
[填空题]下列程序段的输出结果为 (15) 。
Dim S1(5) As Integer,S2(5) As Integer,S3(5) As Integer
N=4
For I=1 To N
S1(I)=I
S2(I)=L
Next I
S3(5)=0
For K=1 To N
S3(K)=S1(K)*S2(K)
S3(5)=S3(5)+S3(K)
Next K
Print S1(3); S1(5); S1(2)
Print S2(4); S31); S3(5)
[填空题]下面程序段的输出结果为 (6) 。
Dim S1(5) As Integer,S2(5) As Integer,S3(5) As Integer
N=4
For I=1 To N
S1(I)=I
L=N+1-I
S2(I)=L
Next I
S3(5)=0
For K=1 To N
S3(K)=S1(K)*S2(K)
S3(5)=S3(5)+S3(K)
Next K
Print S1(3); S1(5); S1(2)
Print S2(4); S3(1); S3(5)
[填空题]下列程序段的输出结果为______。
Dim S1(5)As Integer,S2(5)As Integer,S3(5)As Integer
N=4
ForI=1 To N
S1(I)=I
L=N+i-I
S2(I)=L
NextI
S3(5)=0
ForK=1 To N
S3(K)=S1(K)*S2(K)
S3(5)=S3(5)+S3(K)
NextK
PrintS1(3)=S1(5);S1(2)
PrintS2(4)=S3(1);S3(5)
[填空题]下列程序段的输出结果为______。
Dimy As Integer
Private Sub Commandl_CUck( )
DimX As Integer
x=2
TeKt1.Text=SecondFunc(FirStFunC(X),y)
Text2.Text=FirstFunc(X)
End Sub
PrivateFunctionFirstFunc(XASInteger)As Integer
x=x+y:y=x+y
FirstFunc=x+y
End Function
PtivateFunction SecondFunc(X As Integer,y AS Integer)As Integer
SecondFunc=2*x+y
End Function
[填空题]已知如下程序段:
Dim MyInt As Integer
Dim MyLen
MyLen=Len(MyInt)
执行以上程序段后,MyLen为______。
[填空题]下列程序段的输出结果为______。
Dimy As Integer
Private Sub Commandl_CUck( )
DimX As Integer
x=2
TeKt1.Text=SecondFunc(FirStFunC(X),y)
Text2.Text=FirstFunc(X)
End Sub
PrivateFunctionFirstFunc(XASInteger)As Integer
x=x+y:y=x+y
FirstFunc=x+y
End Function
PtivateFunction SecondFunc(X As Integer,y AS Integer)As Integer
SecondFunc=2*x+y
End Function
[单项选择]下列程序段的执行结果为 ______。
Dim m(3,3)As Integer
Dim i As Integer
Dim j As Integer
Dim x As Integer
For i=1 To 3
m(i,i)=i
Next
For i=0 To 3
For j=0 To 3
x=x+m(i,j)
Next
Next
Print x
A. 3
B. 4
C. 5
D. 6
[单项选择]下列程序段的执行结果为______。
Dim m(3,3)As Integer
Dim i As Integer
Dim j As Integer
Dim x As Integer
For i=1 To 3
m(i,i)=i
Next
For i=0 T0 3
For j=0 To 3
x=x+m(i, j)
Next
Next
Print x
A. 3
B. 4
C. 5
D. 6
[填空题]下列程序段运行结果是______。
Dim c As Integer,num As Integer
Num=29483
Do
c=num Mod 10
Print c;
num=num/10
Loop While num<>0
[单项选择]假定有如下的程序段:Dim intVarAs Integer intvar=True Print intVar则输出结果是
A. 0
B. -1
C. True
D. False
[填空题]下面程序段运行后,变量X的值为 【14】 。
Dim X As Integer
Dim I as Integer
X = 0
For i = 0 to 50 step 10
X=X+i
Print X
[填空题]下面程序段运行后,变量x的值为上 【15】 。
Dim x As Integer
Dim i As Integer
x=O
for i=0 to 50 step 10
X=X+i
next i
[单项选择]23 有如下程序段,该程序段循环的次数是______。 Dim i As Integer Dim j As Integer Dim k As Integer k=0 For i = 0 To 10 Step 3 For j = 1 To 5 If j > 3 Then k = k + 4: Exit For k=k+1 Print k Next j If i > 8 Then Exit For Next i
A. 9
B. 10
C. 11
D. 12