单选题If x is an integer and y=7x+11, what is the greatest value of x for which Y is less than 50?A 7B 6C 5D 4E 3

题目
单选题
If x is an integer and y=7x+11, what is the greatest value of x for which Y is less than 50?
A

7

B

6

C

5

D

4

E

3


相似考题
更多“单选题If x is an integer and y=7x+11, what is the greatest value of x for which Y is less than 50?A 7B 6C 5D 4E 3”相关问题
  • 第1题:

    有以下函数过程: Function Gys (ByVal x As Integer, ByVal y As Integer) As Integer Do While y<>0 Reminder = x Mod y x = y y= Reminder Loop Gys=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a = 50 b = 10 x=Gys (a,B)Print x End Sub

    A.0

    B.10

    C.50

    D.100


    正确答案:B
    解析:本首先要读懂Gys函数过程的意思,Gys函数过程返回参数y的值,具体过程是先令参数x的值为y的值,y的值为xMody的值,再令Gys值为x的值,据此本题的正确结果为10,选B。

  • 第2题:

    单击一次窗体之后,下列程序代码的执行结果为______。 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 Function

    A.21

    B.23

    C.19

    D.35


    正确答案:B

  • 第3题:

    有如下函数过程: Function Fun(By Val x As Integer,By Val y As Integer)As Integer Do While Y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下调用函数的事件过程,该程序的运行结果是 Private Sub Command7_Click() Dim a As Integer,b As Integer a=100:b=25 x=Fun(a,B) Print x End Sub

    A.0

    B.25

    C.50

    D.100


    正确答案:B
    解析:函数的参数传递分为按值传递和按地址传递两种。按值传递是指实参直接将值传递给形参,形参不改变实参的值;按地址传递是指实参将变量的地址传递给形参。在调用函数时要注意参数的传递方式,不同的传递方式使得语句执行结果不同。

  • 第4题:

    设有如下程序:

    Prirate Sub Form_Click()

    Dim a As Integer,b AS Integer

    a=20:b=50

    p1 a,b

    p2 a,b

    p3 a,b

    Print"a=";a,"b=";b

    End Sub

    Sub p1(x As Integeh By Val y As Integer)

    x=x+10

    y=y+20

    End Sub

    Sub p2(ByVal x As Integer,y As Integer)

    x=x+10

    y=y+20

    End Sub

    Sub p3 (ByVal x As Integer,ByVal y As Integer)

    x=x+10

    y=y+20

    End Sub

    该程序运行后,单击窗体,则在窗体上显示的内容是:a= ______ 和b= _____。


    正确答案:30 70
    30 70

  • 第5题:

    要想在过程Proc调用后返回形参x和Y的变化结果,下列定义语句中正确的是( )。【考点5过程调用与参数传递】

    A.Sub Proc(x as Integer,Y as Integer)

    B.Sub Proc(ByVal x as Integer,Y as Integer)

    C.Sub Proc(x as Integer,ByVal Y as Integer)

    D.Sub Proc(ByVal x as Integer,ByVal Y as Integer)


    正确答案:A
    本题考查VBA中参数传递的知识。在VBA的过程调用时,参数有两种传递方式:传址传递和传值传递。如果在过程声明时形参用ByVal声明,说明此参数为传值调用;若用ByRef声明,说明此参数为传址调用:若没有说明传递类型,则默认为传址传递,即形参的结果会传递给实参。

  • 第6题:

    单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click( ) Dim x As Integer,y As Integer x=50:y=78 Call PPP(x,y) Print x;y End Sub Public Sub PPP(ByVM n As Integer,ByVal m As Integer) n=n\l0 m=m\l0 End Sub

    A.08

    B.50 78

    C.450

    D.78 50


    正确答案:B
    解析:在调用过程时,一般主调与被调过程之间有数据传递,即将主调过程的实参传递给被调用的过程,完成实参与形参的结合,然后执行被调过程,在VisualBasic中,实参与形参的结合有两种方式,即传址与传值。这两种方法的特点如下:1)传址的结合过程时:当调用一个过程时,它将实参的地址传给形参,因此在被调用的过程中,对形参的任何操作都变成了对相应实参的操作,因此实参的值会随形参的改变而改变。2)传值的结合过程时:当调用一个过程时,系统将实参的值复制给形参并断开了联系,被调用过程中的操作是在形参自己的存储单元中进行的,当过程调用结束时,这些形参所占用的存储单元也同时被释放,因此在过程中对形参的任何操作不会影响实参。而题中被调过程PPP中有两个形参,两者均为传值方式。主调过程分别把实参x、y传递给PPP,所以当过程调用结束后,实参x、y的值都没有改变,最后输出的值应为5078。

  • 第7题:

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

    A.6 6 12 7 11 11

    B.8 5 10 5 11 11

    C.9 6 12 9 10 15

    D.8 10 10 5 9 10


    正确答案:A
    解析:从整体上看,可得主调过程将两次调用过程God后,实参的值将随形参变化而变化,现在分析一下这两次调用实参和形参是怎么变化的:第一次调用被调过程God,主调过程把实参x,x和z的地址分别传给形参x,y和z,此时形参x,y和z值分别为1,1和3,执行语句x=3*z+1后,形参x值变为10,此时相对应的实参x也变为10,执行语句y=2*z后,形参y值变为6,则相对应的实参x值变为6。执行z=x+y后,形参z值应为12,当然这次调用后,程序代码输出的数值为6,6,12;第二次调用被调过程God,主调过程把实参x,x和y的地址分别传给形参x,y和z。应注意,此时实参x的值为6而不是1,所以此时形参x,y和z值分别为6,2和2,执行语句x=3*z+1后,形参x值为7,相对实参x值也相应的变为7。执行语句y=2*z后,形参y值变为4,相应的实参y值也变为4,执行z=x+y后,形参z值变为11,相应的实参y的值变为11,而形参y和z的地址相同,所以最后它们值都应为11,所以此次调用后,输出的数值为7,11和11。

  • 第8题:

    Less Test{    public static void main(String[] args){   for(int x=0;x<7;++x){  int y=2;   x=++y;   }   System.out.println(“y=”+y);   }   }   结果为:()  

    • A、y=5
    • B、y=6
    • C、 y=7
    • D、y=8
    • E、编译失败
    • F、运行时异常被抛出

    正确答案:E

  • 第9题:

    单选题
    If x-y = 3 and x+y = 5, what is the value of y?
    A

    -4

    B

    -2

    C

    -1

    D

    1

    E

    2


    正确答案: C
    解析:
    Eliminate y by adding corresponding sides of the two equations: x-y=3, x+y=5, therefore 2x+0=8, so x=8/2=4. Since x= 4 and x -y = 3, then 4-y = 3, so y = 1.

  • 第10题:

    问答题
    If w+x+y=42, what is the value of wxy?  (1) x and y are consecutive odd integers  (2) w=2x

    正确答案: C
    解析:
    将两个条件综合可知,wxy=2178,故本题选C项。

  • 第11题:

    单选题
    If x-9 = 2y and x+3 = 5y, what is the value of x?
    A

    -2

    B

    4

    C

    11

    D

    15

    E

    17


    正确答案: A
    解析:
    Subtract corresponding sides of the two given equations: x+3=5y, x- 9= 2y →0+ 12=3y. 12/3 = y or y=4. Since y= 4 and x + 3 = 5y, then x + 3 = 5(4) = 20, so x=20-3=17.

  • 第12题:

    单选题
    If 2x-3y = 11 and 3x+15 = 0, what is the value of y?
    A

    -7

    B

    -5

    C

    1/3

    D

    3

    E

    10


    正确答案: B
    解析:
    First solve the equation that contains one variable. Since 3x+15 = 0, then 3x = -15, so x = -15/3 = -5. Substituting -5 for x in the other equation, 2x-3y = 11, gives 2(-5)-3y = 11 or -10-3y = 11. Adding 10 to both sides of the equation makes -3y = 21, so y = -21/3 = -7.

  • 第13题:

    单击一次窗体之后,下列程序代码的执行结果为______。 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 Sub

    A.1 2 3 30 39 72

    B.1 2 3 1 2 3

    C.30 39 72 1 2 3

    D.30 39 72 30 39 72


    正确答案:D

  • 第14题:

    单击命令按钮时,下列程序的执行结果是

    Private Sub Commandl_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 Function

    A.20

    B.22

    C.28

    D.30


    正确答案:C
    解析:此题程序代码中用了双层调用,我们对这样的问题要多加小心,千万不要把实参和相对应的形参弄混。主调过程Command1_Click输出的是SecProc(c,b,A)的返回值,调用过程SecProc时,主调过程分别把实参c、b、a地址传给形参x、y、z,此时在过程SecProc中,SecProc=FirProc(a,c,B)+c。由此看出,程序段执行此语句时,将调用过程FirProc。把实参a、c、b的地址分别传给形参x、y、z,此时在过程FirProc中,FirProc=2*x+y+3*z,所以FirProc(a,c,B)=6+4+ 15=25,SecProc(a,c,B)=25+3=28,所以选项C)是正确的。

  • 第15题:

    单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click() Dim x As Integer,y As Integer x=50:y=78 Call PPP(x,y) Print x;y End Sub Public Sub PPP(ByVal n As Integer,ByValm As Integer) n=n\10 m=m\10 End Sub

    A.08

    B.50 78

    C.450

    D.78 50


    正确答案:B
    解析:在调用过程时,一般主调与被调过程之间有数据传递,即将主调过程的实参传递给被调用的过程,完成实参与形参的结合,然后执行被调过程,在VisualBasic中,实参与形参的结合有两种方式,即传址与传值。这两种方法的特点如下:传址的结合过程时,当调用一个过程时,它将实参的地址传给形参,因此在被调用的过程中,对形参的任何操作都变成了对相应实参的操作,因此实参的值会随形参的改变而改变。传值的结合过程时,当调用一个过程时,系统将实参的值复制给形参并断开了联系,被调用过程中的操作是在形参自己的存储单元中进行的,当过程调用结束时,这些形参所占用的存储单元也同时被释放,因此在过程中对形参的任何操作不会影响实参。而题中被调过程PPP中有两个形参,两者均为传值方式。主调过程分别把实参x、y传递给PPP,所以当过程调用结束后,实参x、y的值都没有改变,最后输出的值应为5078。

  • 第16题:

    有如下函数:Private Function firstfunc(x As Integer, y As Integer) As Integer Dim n As Integer Do While n <= 4 x=x +y n=-+1 Loop firstfunc = x End Function调用该函数的事件过程如下:Private Sub Command1_lick() Dim x As Integer Dim y As Integer Dim n As Integer Dim z As Integer x=1 y=1 For n = 1 To 3 z = firstfunc(x, y) Next n Print z End Sub该事件过程的执行结果是 ______。

    A.1

    B.3

    C.16

    D.9


    正确答案:C

  • 第17题:

    有以下函数过程: Function Gys(ByVal x As Integer,ByVal y As Integer)As Integer Do While y< >0 Remender=x Mod v x=y Y=Reminder Loop Gys=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click( ) Dim a As Integer Dim b As Integer a=50 b=10 x=Cys(a,B)Print x End sub

    A.0

    B.10

    C.50

    D.100


    正确答案:B
    解析:首先要读懂Gys函数过程的意思,Gys函数过程返回参数y的值,具体过程是先令参数x的值为y的值,y的值为xMody的值,再令Gys值为x的值,据此本题的正确结果为10。

  • 第18题:

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

    A.6 6 12 6 6 10

    B.9 5 10 5 10 10

    C.9 6 12 9 10 15

    D.9 5 10 5 4 10


    正确答案:A
    解析:从整体上看,主调过程将两次调用过程Proc1后,实参的值将随形参变化而变化,现在分析一下这两次调用实参和形参是怎么变化的。第一次调用被调过程proc1,主调过程把实参x,x,z的地址分别传给形参x,y,z,此时形参x,y,z值分别为1,1,3,执行语句x=3*z后,形参x值变为9,此时相对应的实参,也变为9,执行语句y=2*z后,形参y值变为6,则相对应的实参x值为6。执行z=x+y后,形参。值应为12,当然这次调用后,程序代码输出的数值为6,6,12。第二次调用被调过程proc1,主调过程把实参x,x,x的地址分别传给形参x,y,z。我们应注意一下,此时实参x的值为6而不是1,所以此时形参x,y,z值分别为6,2和2,执行语句x=3*z后,形参x值为6,相对实参x值也相应的变为6。执行语句y=2*z后,形参y值变为4,相应的实参y值也变为4,执行z=x+y后,形参z值就为10,相应的实参Y的值变为10,而形参y和。的地址相同,最后它们值都应为10,所以此次调用后,程序代码将输出的数值为6,10和10。

  • 第19题:

    单击命令按钮时,下列程序的执行结果是 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+2 End Function Function SecProc( x As Integer, y As Integer, z As Integer) SecProc = FirProc ( z, x, y) + x + 7 End Function

    A.20

    B.25

    C.37

    D.32


    正确答案:C
    解析:此题程序代码中用了嵌套调用,我们对这样的问题要多加小心,不能掉以轻心,千万不要把实参和相对应的形参弄混淆。主调过程Command1_Click输出的是SecProc(c,b,a)的返回值,调用过程SecProc时,主调过程分别把实参c、b、a地址传给形参x、y、z,此时在过程SecProc中,SecProc;FirProc(a,c,B)+7。由此看出,程序段执行此语句时,将调用过程FirProc。把实参a,c,b的地址分别传给形参x、y、z,此时在过程FirProc中,FirProc=2*x+y+3*z+2,所以FirProe(a,c,b)=6+4+15+2=27,SecProc(a,c,b)=27+3+7=37。

  • 第20题:

    下列语句执行后的结果是()。 y=5;p=&y;x=*p++;

    • A、x=5,y=5
    • B、x=5,y=6
    • C、x=6,y=5
    • D、x=6,y=6

    正确答案:A

  • 第21题:

    问答题
    What is the value of x-y?  (1) (x-y)2=25  (2) 4x=4 (y+3)

    正确答案: B
    解析:
    条件1不能确定x-y的值,由条件2可知,x-y=3,故本题选B项。

  • 第22题:

    问答题
    If x+y=36, what is the value of xy?  (1) y-x=14  (2) y=2x+3

    正确答案: D
    解析:
    分别将两个条件代入题目,可以计算出x=11,y=25,故本题应选D项。

  • 第23题:

    单选题
    If x is an integer and y=4x+3, which of the following cannot be a divisor of y?
    A

    5

    B

    6

    C

    7

    D

    9

    E

    23


    正确答案: A
    解析:
    将几个选项代入反解x可知,y的值不可能为6,故本题选B项。