网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
14、有如下程序段,该程序段运行后Label1中显示的内容为______。 Dim x$, y% x = "boy or girl?" y = Len(x) If y < 11 Then Label1.Text = "I am " & Mid(x, 1, 3) Else Label1.Text = "I am " & Mid(x, 8, 4) End If
A.boy or girl?
B.I am boy
C.I am girl
D.I am boy or girl?
参考答案和解析
B
更多 “14、有如下程序段,该程序段运行后Label1中显示的内容为______。 Dim x$, y% x = "boy or girl?" y = Len(x) If y < 11 Then Label1.Text = "I am " Mid(x, 1, 3) Else Label1.Text = "I am " Mid(x, 8, 4) End IfA.boy or girl?B.I am boyC.I am girlD.I am boy or girl?” 相关考题
考题
执行以下程序段a$="abbacddcba"For i=6 To 2 Step -2X=Mid(a,i,i)Y=Left(a,i)z=Right(a,i)z=UCase(X Y z)Next iPrint z输出结果为( )。A.ABAB.BBABBAC.ABBABAD.AABAAB
考题
下列程序段的结果为 ______。 A= "ABBACDDCBA" For I= 6 To 2 Step-2 X=Mid(A,I,I) Y=Left(A,I) Z=Right(A,I) Z=X Y Z Next I Print ZA.ABAB.AABAABC.BBABBAD.ABBABA
考题
设有如下程序:Private Sub Form_Click()Dim i As Integer,x As String,Y As Stringx=”ABCDEFG”For i=4 To 1 Step-1y=Mid(x,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG
考题
下面程序段中正确的是()。A.If x=2 Then y=3B
下面程序段中正确的是( )。A.If x<0 Then y=0 If x<1 Then y=1 If x<2 Then y=2 If x>=2 Then y=3B.If x>=2 Then y=3 If x>1 Then y=2 If x>=0Then y=1 If x>0 Then y=0C.If x<0 Then y=0 Else If>=0Then y=1 Else y=3 End IfD.If x>=2 Then y=3 Else If>=1 Then y=2 Else y=0 End If
考题
设有如下程序: Private Sub Form. Click( ) Dim i As Integer,x As String,y As String x="ABCDEFG" For i=4 To 1Step-1 y=Mid(X,i,i)+y Next i Print y End Sub 程序运行后,单击窗体,输出结果为( )。A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG
考题
有如下程序: Private Sub Commandl_Click( ) Dim i As Integer For i=1 To 2 DS Next i End Sub Sub DS( ) Dim x As Integer,m As String Static y,n X=X + 1 y=y + 1 m=m "*”:n=n"#" Print x,y,m,n End Sub 程序运行后,输出的结果是A.1 1 * #B.1 1 * #C.1 1 * # 1 1 * # 1 2 * #D.1 1 * # 1 1 * ## 1 2 * ##
考题
有以下程序段:includedefine MAX(x,y)(x)>(y)?(x):(y)void main(){ int i,j,k; i=
有以下程序段: #include<iostream.h> #define MAX(x,y)(x)>(y)?(x):(y) void main() { int i,j,k; i=10; j=15;k=MAX(i,j)*10; cout<<k<<end1; } 程序执行后的输出结果是( )。A.15B.100C.150D.10
考题
下列程序段的执行结果为 a="ABBACDDCBA" For I=6 To 2 Step-2 x=Mid(a,I,I) y=Leh(a,I) z=Right(a,I) z=x y z Next I Print zA.ABAB.AABAABC.BBABBAD.ABBABA
考题
下列程序段的执行结果为______。 x=5 y = -20 If Net x>0 Then x=y -3 Else y=x+3 Print x-y;y-x End IfA. -3 3B.5 -8C.3 -3D.25 -25
考题
设有以下程序:Private Sub Form_ Click() x=50 For i=1 To 4 y=InputBox(“请输入—个整数”) y=Val(y) If y Mod 5=0 Then a=a+ y x=y Else a=a+ x End If Next i Print aEnd Sub 程序运行后,单击窗体,在输入对话框中依次输入15、24、35、46,输出结果为 ______。A.100B.50C.120D.70
考题
有如下事件程序,运行该程序后输出结果是( )。 PrivateSub Command33_click Dim x AsInteger,Y AsInteger x=1:y=0 Do Untily=25y=y+x*xx=x+1 Loop MsgBox”x=&x&”,y="Y End SubA.x=1,y=0B.x=4,y=25C.x=5,y=30D.输出其他结果
考题
执行以下程序段 a$ ="abbacddcba" For i = 6 To 2 Step - 2 X = Mid(a, i,i) Y=Left(a, i) z=Right(a,i) z=UCase(X Y Z) Next i Print z 输出结果为A.ABCB.BBABBAC.ABBABAD.AABAAB
考题
有如下事件过程: Private Sub Commaild1_Click( ) Dim i As Integer For i =1 To 2 DC Next i End Sub Sub DC( ) Dim x As Integer,m As String Static y,n x=x + 1 y=y + 1 m=m"*":n=n "#" Print x,y,m,n End Sub 程序运行后,输出的结果是A.1 1 * # 1 1 * #B.1 1 * # 1 2 * #C.1 1 * # 1 1 * ##D.1 1 * # 1 2 * ##
考题
下列程序段的结果为 A = "ABBACDDCBA" For i=6 To 2 Step -2 X = Mid(A,i,i) Y=Left(A,i) Z=Right (A,i) Z=X Y Z Next Print ZA.ABCB.AABAABC.BBABBAD.ABBABA
考题
编写如下事件过程: Private sub sub1 (ByVal x1 As String, y1 As String) Dim xt As String Dim i As Integer i = Len(x1) Do While i>= 1 xt = xt + Mid(x1, i, 1) i=i-1 Loop y1 = xt End Sub Private Sub Form. Click() Dim s1 As String, s2 As String s1= "teacher" sub1 s1, s2 Print s2 End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.rehcaetB.tahreeeC.themeeD.eerthea
考题
设有如下程序:Prirate Sub Form_Click()Dim a As Integer,b AS Integera=20:b=50p1 a,bp2 a,bp3 a,bPrint"a=";a,"b=";bEnd SubSub p1(x As Integeh By Val y As Integer)x=x+10y=y+20End SubSub p2(ByVal x As Integer,y As Integer)x=x+10y=y+20End SubSub p3 (ByVal x As Integer,ByVal y As Integer)x=x+10y=y+20End Sub该程序运行后,单击窗体,则在窗体上显示的内容是:a= ______ 和b= _____。
考题
执行以下程序段 a$=“abbacddcba” For i=6 To 2 Step-2 X=Mid(a,i,i) Y=Left(a,i) z=Right(a, i) z=Ucase(X Y z) Next i Print z 输出结果为A.ABAB.BBABBAC.ABBABAD.AABAAB
考题
下列程序段的结果为_______。 A="ABBACDDCBA" For I=6 To 2 Step -2 X=Mid(A,I,I) Y=Left(A,I) Z=Right(A,I) Z=X Y Z Next I Print ZA.ABAB.AABAABC.BBABBAD.ABBABA
考题
下列根据此段程序的运算的结果正确的是( )。 Dim x AS Single Dim y As Single If x < 0 Then y = 3 ElseIf x< 1 Then y = 2 * x Else:y = -4 * x + 6 End IfA.当x=2时,y=-2B.当X=-1时,y=-2C.当x=0.5时,y=4D.当x=-2.5时,y=11
考题
下列程序段的结果为A="ABBACDDCBA"For i=6 To 2 Step-2X=Mid(A,i,i)Y=Left(A,i)Z=Right (A,i)Z=X Y ZNextPrint ZA.ABCB.AABAABC.BBABBAD.ABBABA
考题
下面程序段的运算结果正确的是( )。 Dim x As Single Dim y As Single If x < 0 Then y=3 Elself x < 1 Then y=2*x Else: y= -4 * x+6 End IfA.当x=2时,y=-2B.当x=1时,y=3C.当x=0.5时,y=-4D.当x=-2.5时,y=11
考题
编写如下程序: Private Sub Command1_Click() x="abcd" y="1234" For i=1 To 4 z=z+Mid(x,i,1)+Left(y,1) Next i Print z End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.abcd1234B.a1b2c3d4C.a1b1c1d1D.1234abcd
考题
运行下列程序:Private Sub Form_Click( )Dim x As Integer, y As String, z As Stringy = 12345For x = 1 To Len(y)z = Mid(Left(y, x), 1)Next xPrint zEnd Sub单击窗体后,则在窗体上显示的结果是( )。A.1B.11111C.55555D.12345
考题
运行下列程序:Private Sub form_Click( )x$ = 123: y$ = abcn = Len(x)For i = 1 To nPrint Mid(x$, n + 1 - i, 1) + Mid(y$, i, 1);Next iPrintEnd Sub单击窗体后,则输出结果是( )。A.a1b2c3B.a3b2c1C.3a2b1cD.1c2b3a
考题
设有如下程序: Private Sub Form. Click( ) Dim i As Integer,x As String,y As String x=ABCDEFGFor i=4 To 1Step-1y=Mid(X,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为( )。A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG
考题
下列程序段的结果为______。A="ABBACDDCBA"For I=6 T0 2 Step-2X=Mid(A,I,I)Y=Left(A,1)Z=Right(A,1)Z=X Y ZNext 1Print 2A.ABAB.AABAABC.BBABBAD.ABBABA
考题
下列程序段运行后输出的结果是()。 Private Sub Form_Click Dim X#, Y# X = 5: Y = 6 Print X + Y = 11 End SubA、X+Y=11B、5+6=11C、11D、True
考题
单选题有以下程序段,若变量已正确定义并赋值
if(ab)printf(x=%d,,x);
elseprintf(y=%d,,y);
if(a=b)i++;
elsej++;
则与此程序段功能相同的选项是( )。A
if(ab)
{
printf(x=%d,,x);
j++
}
else
{
printf(y=%d,,y);
i++
}
B
if(ab){ printf(x=%d,,x); i++}else{ printf(y=%d,,y); j++}C
if(a=b){ printf(x=%d,,x); i++}else{ printf(y=%d,,y); j++}D
if(a=b){ printf(x=%d,,x); i++}else{ printf(y=%d,,y); j++}
热门标签
最新试卷