更多"[单选题]第288题 (1.0分)有如下程序.Dim zxs As I"的相关试题:
[单选题]第288题 (1.0分)
有如下程序.
Dim zxs As Integer
Zxs%=232
Zxs=232.32
Print zxs%;zxs
运行后,输出结果是().
A.232232032
B.232232
C.232.32232.32
D.显示出错信息
[单选题]有如下程序:
Dim zxs As Integer
Zxs%=232
Zxs=232.32
Print zxs%;zxs
运行后,输出结果是().
A.232232032
B.232232
C.232.32232.32
D.显示出错信息
[单选题]有如下程序,该段程序将().
Private Sub Command1_Click()
Dim i AS Integer, k AS Integer
For i=1 To 10 Step 0
K = k + 2
Next i
End Sub
A.形成无限循环
B.循环体执行一次后结束循环
C.语法错误
D.循环体不执行即结束循环
[单选题]第209题 (1.0分)
有如下程序,该程序的执行结果为().
Dim k As Integer
N=5
M=1
K=1
Do until k>n
m=m*2
k=k+1
Loop
Print m
A.1
B.5
C.32
D.40
[单选题]有如下程序,该程序的执行结果为().
Dim k As Integer
N=5
M=1
K=1
Do until k>n
m=m*2
k=k+1
Loop
Print m
A.1
B.5
C.32
D.40
[单选题]设有如下程序:
Private Sub Command1_Click()
Dim sum As Double,x As Double
Sum = 0
N = 0
For i = 1 To 5
X = n / i
N = n + 1
Sum = sum + x
Next
End Sub
该程序通过For循环计算一个表达式的值,这个表达式是().
A.1+1/2+2/3+3/4+4/5
B.1+1/2+2/3+3/4
C.1/2+2/3+3/4+4/5
D.1+1/2+1/3+1/4+1/5
[单选题]有如下程序:
Dim a As String,b As String
A=12345
H="abcde"
For i=1 To 5
C=c+Left(a,i)+Right(b,i)
Next i
Print c
运行后输出的结果是().
A.alb2c3d4e5
B.1a2b3c4de5
C.eld2c4b5eld2c3b4a5
D.1e12del23cdel234bcdel2345abcde
[单选题]第291题 (1.0分)
有如下程序.
Dim a As String,b As String
A=12345
H="abcde"
For i=1 To 5
C=c+Left(a,i)+Right(b,i)
Next i
Print c
运行后输出的结果是().
A.alb2c3d4e5
B.1a2b3c4de5
C.eld2c4b5eld2c3b4a5
D.1e12del23cdel234bcdel2345abcde
[单选题]题 (1.0分)
有如下程序.
Const n=-5.Const M=6
Dim a(n To M)
For i=Lbound(a,1) To Ubound(a,1)
A(i)=I
Next I
Print a(Lbound(a,1));a(Ubound(a,1))
运行后输出结果为().
A.0 0
B.-5 0
C.-5 6
D.0 6
[单选题]题 (1.0分)
有如下程序.
Dim arr(3,3)
For j=1 To 3
For k=1 To 3
Arr(j,k)=(j-1)*3+k
Next k
Next j
For j=2 To 3
For k=2 To 3
Print arr(k,j);
Next k
Print
Nextj
运行后,输出的结果是().
A.2 5 3 6
B.5 8 6 9
C.4 7 5 8
D.5 9 6 8
[单选题]题 (1.0分)
如下程序.
运行的结果是().
Dim a%, b%, c%
Public Sub p1(x%, y%)
Dim c%
X = 2 * x. y = y + 2. c = c + y
End Sub
Public Sub p2(x%, ByVal y%)
Dim c%
X = 2 * x.. y = y + 2. c = x + y
End Sub
Private Sub Command1_Click()
A = 2. b = 4. c = 6
Call p1(a, ((B)
Print "a=";
A, "b=";
B, "c="; c
Call p2(a, ((B)
Print "a=";
A, "b=";
B, "c="; c
End Sub
A.a=2 b=4 c=6
A=4 b=6 c=10
B.a=4 b=4 c=10
A=8 b=8 c=16
C.a=4 b=6 c=6
A=8 b=6 c=6
D.a=4 b=6 c=14
A=8 b=8 c=6
[单选题]下面程序段:
Dim y
If y Then Print y+1 Else Print y+2
运行后,显示的结果是().
A.2
B.0
C.-1
D.显示出错信息
[单选题]第233题 (1.0分)
有如下程序,该段程序将().
Private Sub Command1_Click()
Dim i AS Integer, k AS Integer
For i=1 To 10 Step 0
K = k + 2
Next i
End Sub
A.形成无限循环
B.循环体执行一次后结束循环
C.语法错误
D.循环体不执行即结束循环
[单选题]有如下程序段,该程序段执行完毕后,共循环次数为().
Private Sub Commandl_Click()
For i=1 To 5
For j=1 To i
For k=j To 4
Print"a";
Next k
Print
Next j
Print
Next i
End Sub
A.4
B.5
C.38
D.40
[单选题]现有如下程序,则程序的输出结果为( )。
Int f(int
A,int b)
{ int c;
if(a>0&&a<10) c=(a+b)/2;
else c=a*b/2;
return c;
}
Int main()
{ int a=8,b=20,c;
c=f(a,b);
cout << c << endl;
return 0;
}
A. 随机数
B. 80
C. 28
D. 14
[单选题]阅读如下程序段,则程序在先后输入love和china后,输出结果是( )。
Int main()
{ char a[30],b[30];
int k;
gets(a);
gets(b);
k=strcmp(a,b);
if(k>0) puts(a);
else if(k<0) puts(b);
return 0;
}
A. love
B. china
C. lovechina
D. 没有输出结果