网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
设计下列伪程序的语句覆盖测试用例。 BEGIN INPUT(A,B,C) IF A>5 THEN X=10 ELSE X=1 END IF IF B>10 THEN Y=20 ELSE Y=2 END IF IF C>15 THEN Z=30 ELSE Z=3 END IF PRINT(X,Y,Z) END

参考答案

参考解析
更多 “设计下列伪程序的语句覆盖测试用例。 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” 相关考题
考题 program exam(output); var x,y,x:integer; proedure silly(x:integer;vary:integer); begin x:=5;y:=6;z:=3; writeln(x,y,z) end; begin x:=1;y:=2;z:=3; silly(x,y); writeln(x,y,z) end. 以上程序运行结果为(). A567 563B567 567C567 167D567 163

考题 单击命令按钮执行下列程序,其输出结果是。 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

考题 下面程序段中正确的是()。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

考题 下列块结构条件语句,正确的是( )。A.If x>10 Then print"a" Else if x>5 Then print"b" Else if x<5 Then print"c" End ifB.if x>10 Then print"a" Else if x>5 Print"b" Else Print"c" End ifC.If x>10 Then print"a" Else if x>5 Then print"b" Else x<5 Then Print"c" End ifD.If x>10 Then Print"a" Else if x>5 Then print"b: Else Print"c" End if

考题 单击命令按钮时,下列程序的执行结果是Private Sub Command1_Click()Dima 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*z+2End FunctionFunction SecProc(x As Integer,y As Integer,z As Integer)SecProc=FirProc(z,x,y) +x+7End FunctionA.20B.25C.37D.32

考题 单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer a=2:b=3:C=4 Print P2(c,b,A)End Sub Private Function P1(x As Integer,y As Integer,z As Integer) P1=2 * X + y + 3 * z End Function Private Function P2(x As Integer,y As Integer,z As Integer) P2=P1(z,x,y) + X End FunctionA.21B.19C.17D.34

考题 单击按钮时,以下程序运行后的输出结果是 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

考题 单击命令按钮时,下列程序代码的执行结果为 ( ) 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 Function Private Sub Commandl Click() Dim a As Integer, b As Integer, c As Integer a=2 :b=3 :c=4 Print SecProc(c, b,A)End SubA.21B.19C.17D.34

考题 下列程序段( )能够正确实现条件:如果X<Y则A=15,否则A=-15。A.If X<Y Then A=15 A=-15 Prin AB.If X<Y Then A=15:Print A A=-15:Print AC.If X<Y Then A=1.5:Print A Else A=-15:Print A End IfD.If X<Y Then A=15 Else A=-15 Print A End If

考题 单击一次窗体之后,下列程序代码的执行结果为______。 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 Command1_ Click() Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 4 Print Value(a, b,C)End Sub Function Num(x As Integer, y As Integer, z As Integer) Num = x * x + y * y + z * z End Function Function Value(x As Integer, y As Integer, z As Integer) Value = Num(x, y, z) + 2 * x End FunctionA.21B.23C.19D.35

考题 单击命令按钮时,下列程序的执行结果是 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=Input Box("input value Of x”) Select Case x Case IsO y=y+1 Case Is=0 y=x+2 Case Else y=x+3 End Select Print x;y 运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 单击命令按钮执行下列程序,其输出结果是( )。 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<y Then z=y Else z=x

考题 运行下列程序: x=InputBox("input value of x") Select Case X Case Is>0 y=y+1 Case Is=0 y=x+2 Case ELse y=x+3 End Select Print x;y 运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 有如下程序 x=InputBox("input value of x") Select Case x Case Is>0 y=y+1 Case Is=0 y=x+2 Case Else y=x+3 End Select Print x ;y 运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 单击命令按钮时,下列程序的执行结果是 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

考题 有如下程序: x = InputBox("Input value of x") Select Case x Case Is > 0 y=y+1 Case Is = 0 y=x + 2 Case Else y=x + 3 End Select Print x, y运行时,从键盘输入-5,输出的结果是( )。A.-7B.-9C.-8D.-10

考题 以下程序运行后,单击按钮输出结果是 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

考题 单击按钮时,以下程序运行后的输出结果是 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

考题 请为下面的程序设计符合判定覆盖的测试用例。 int main() { int a,b,c,x,y,z,t; scanf(“d%,d%,d%”,a,b,c,t); if a5 t1 x=10 else x=1; if b10 y=20 else y=2; if c15 z=30 else z=3; printf(“d%,d%,d%/n”,x,y,z) }

考题 下列哪条语句是正确的()A、[12;34];B=[3;7];A.*B;B、A=cell(2,3);A(1,2)=[4;5]C、A=[2357;9461;7325];B=[17;05];A(2:end,2:2:end)D、x=-5:5;y=-5:5;z=x.*x-y.*y;surf(x,y,z)

考题 问答题请为下面的程序设计符合判定覆盖的测试用例。 int main() { int a,b,c,x,y,z,t; scanf(“d%,d%,d%”,a,b,c,t); if a5 t10 y=20 else y=2; if c15 z=30 else z=3; printf(“d%,d%,d%/n”,x,y,z) }

考题 问答题设计下列伪程序的语句覆盖测试用例。 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