网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
3、已知x=2,y=10,z=20,以下语句执行后的结果是() if x<y: if z>30: print(“错误”) else: print(“正确”)
A.错误
B.正确
C.无输出
D.语法错误
参考答案和解析
20,10,10
更多 “3、已知x=2,y=10,z=20,以下语句执行后的结果是() if x<y: if z>30: print(“错误”) else: print(“正确”)A.错误B.正确C.无输出D.语法错误” 相关考题
考题
单击命令按钮执行下列程序,其输出结果是。 Private Sub Commana1_Click() Dim a As Integer,b As Integer,c As Integer a = 3 b = 4 c = 5 Print SecProc(c,b,a) End Sub Function FirProc(x As Integer,y As Integer,z As Integer) FirProc = 2 * x + y + 3 * z End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc = FirProc(z,x,y) + x End FunctionA. 20 B. 22 C. 28 D. 30
考题
有以下程序: void f(int v,int w) { int t; t=v;V=W;W=t; } main() { int x=1,y=3,z=2; if(x>y) f(x,y); else if(y>z) f(y,z); else f(x,z); printf("%d,%d<%d\n",x,y,Z); } 执行后输出结果是( )。A.1,2,3B.3,1,2C.1,3,2D.2,3,1
考题
单击按钮时,以下程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=x+y End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer,Z As Integer x=1:y=2:z=3 Call proc1(x,x,z) Print x;x;z Call proc1(x,y,y) Print x;y;y End SubA.6 6 12 `B.9 5 10 6101051010C.9 6 12D.9 10 10 910155410
考题
单击一次窗体之后,下列程序代码的执行结果为______。 Private Sub Command1_ Click() Dim x As Integer, y As Integer, z As Integer x = 1: y = 2: z = 3 Call fun1 (x, y, z) Print x; y; z Call fun2(x, y, z) Print x; y; z End Sub Private Sub fun1(x As Integer, y As Integer, z As Integer) x = 10 * z y=z*z+ x z=x+ y+ z End Sub Private Sub fun2 (ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) x=10*z y=z*z+ x z=x+ y +z End SubA.1 2 3 30 39 72B.1 2 3 1 2 3C.30 39 72 1 2 3D.30 39 72 30 39 72
考题
单击命令按钮时,下列程序的执行结果是Private Sub Commandl_Click()Dim a As Integer,b As Integer,c As Integera=3:b=4:c=5Print SecProc(c,b,A)End SubFunction FirProc(x As Integer,y As Integer,z As Integer)FirProc=2*x+y+3*zEnd FunctionFunction SecProc(x As Integer,y As Integer,z As Integer)SecProc=FirProc(z,x,y) +xEnd FunctionA.20B.22C.28D.30
考题
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click( ) Dim a As Integer,b As Integer,c As Integer a=3 b=4 C=5 Print SecProc(c,b,A)End Sub Function Fir Proc(x As Integer,y As Integer,z As Integer) Fir Proc=2*x+y+3*z End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End FunctionA.20B.22C.28D.30
考题
下面程序的运行结果是( )。 X=-2.3y=125z=Len(StrS(x)+StrS(y))Print Z A.4B.8
下面程序的运行结果是( )。 X=-2.3y=125z=Len(StrS(x)+StrS(y))Print ZA.4B.8C.9D.3
考题
单击命令按钮执行下列程序,其输出结果是( )。 Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a=3 b=4 c=5 Print SecProc(c,b,A)End Sub Function FirProc(x As Integer, y As Integer, z As Integer) FirProc=2*x+y+3*Z End Function Function SecProc(x As Integer,y As Integer, z As Integer) SecProc=FirProc(z,x,y)+x End FunctionA.20B.22C.28D.30
考题
在窗体中添加一个命令按钮,并编写如下程序: Private Sub Command1_CliCk() X=1∶Y=2∶Z=3 X=Y∶Y=Z∶Z=X Print Z End Sub 程序执行后,输出的结果是______。A.3B.0C.2D.1
考题
计算z的值,当x大于等于y时,z=x;否则z=y。下列语句错误的是( )A.If x>=y Then z=x:z=yB.If x>=y Then z=x Else z=yC.z=y:If x>=y Then z=xD.If x<y Then z=y Else z=x
考题
单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer a=3:b=4:c=5 Print SecProc(c,b,a) End Sub Function FirProc(x As Integer,y As Integer,z As Integer) FirProc=2*x+y+3*z End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End FunctionA.20B.22C.28D.30
考题
计算z的值,当x大于y时,z=x;否则z=y。下列语句错误的是( )A. If x>=y Then z=x : z=yB If x>=y Then z=x Else z=yC. z=y : If x>=y Then z=xD. If x
考题
以下程序运行后,单击按钮输出结果是 Private Sub Commandl_Click( ) Dim x As Integer,y As Integer,z As Integer X=4:y=2: Z=3 Call Gopd(x,x,z) Print x;X;Z Call Gopd(x,y,y) Print x;y;y End Sub Private Sub Gopd(x As Integer,y As Integer,z As Integer) X=3 * Z + 1 y=2 * z z=x + y End SubA.6 6 12 7 11 11B.8 5 10 5 11 11C.9 6 12 9 10 15D.8 10 10 5 9 10
考题
计算z的值,当x大于y时,z=x;否则z=y。下列语句错误的是A.If x=y Then z=x:z=yB.If x=y Then z=x Else z=yC.z=y:If x=y Then z=xD.If x=y Then z=y Else z=x
考题
单击按钮时,以下列程序运行后的输出结果是 Private Sub proc1(x As Integer,y As Integer,z As Integer) x=3*z y=2*z z=X+y End Sub Private Sub Command1_Click( ) Dim x As Integer,y As Integer,z As Integer x=1:y=2:z=3 Call proc1(x,x,2) Print x;x;z Call proc1(x,y,y) Print x;y;y End SubA.6 6 12 6 6 10B.9 5 10 5 10 10C.9 6 12 9 10 15D.9 5 10 5 4 10
考题
有以下程序 void f(int v,int w) { int t; t=v;v=w;w=t } main() {int x=1,y=3,z=2; if(x>y) f(x,y); else if(y>z) f(y,z); else f(x,z); pfintf("%d,%d,%d\n",x,y,2); } 执行后输出结果是A.1,2,3B.3,1,2C.1,3,2D.2,3,1
考题
单击按钮时,以下程序运行后的输出结果是 Private Sub Commandl_Click( ) Dim X As Integer,y As Integer,z As Integer x=1:y=2: Z=3 Call God(x,x,z) Print x;x;z Call God(x,y,y) Print X;y;y End Sub Private Sub God(x As Integer,y As Integer,z As Integer) x=3 * Z + 1 y=2 * Z z=x + y End SubA.6 6 12 7 11 11B.8 5 10 5 11 11C.9 6 12 9 10 15D.8 10 10 5 9 10
考题
设计下列伪程序的语句覆盖测试用例。 BEGIN INPUT(A,B,C) IF A5 THEN X=10 ELSE X=1 END IF IF B10 THEN Y=20 ELSE Y=2 END IF IF C15 THEN Z=30 ELSE Z=3 END IF PRINT(X,Y,Z) END
考题
有以下程序 void f(int v,int w) { int t; t=v; v=w; w=t; } main() { int x=1,y=3,z=2; if(xy) f(x,y); else if(yz) f(y,z); else f(x,z); printf("%d,%d,%d/n",x,y,z); }执行后输出结果是()A、1,2,3B、3,1,2C、1,3,2D、2,3,1
考题
执行以下语句后x,y,z的值是()intx=10,y=20,z=30;if(xy){z=x;x=y;y=z;}A、x=10,y=20,z=30B、x=20,y=30,z=30C、x=20,y=30,z=10D、x=20,y=30,z=20
考题
已知intx=10,y=20,z=30;以下语句,if(xy)z=x;x=y;y=z;执行后x,y,z的值是()A、x=10,y=20,z=30B、x=20,y=30,z=30C、x=20,y=30,z=10D、x=20,y=30,z=20
考题
单选题有以下程序 void f(int v,int w) { int t; t=v; v=w; w=t; } main() { int x=1,y=3,z=2; if(xy) f(x,y); else if(yz) f(y,z); else f(x,z); printf("%d,%d,%d/n",x,y,z); }执行后输出结果是()A
1,2,3B
3,1,2C
1,3,2D
2,3,1
考题
问答题设计下列伪程序的语句覆盖测试用例。 BEGIN INPUT(A,B,C) IF A5 THEN X=10 ELSE X=1 END IF IF B10 THEN Y=20 ELSE Y=2 END IF IF C15 THEN Z=30 ELSE Z=3 END IF PRINT(X,Y,Z) END
考题
填空题已知g=lambdax,y=3,z=5:x*y*z,则语句print(g(1))的输出结果为()。
热门标签
最新试卷