niusouti.com

设有如下变量定义: double a=3.500000;float b=2.5; int m=2,n=3; 则表达式“(float)(m+n)/2+(int)a%(int)b”的值是( )A.2.5B.3.5C.4.5D.表达式不正确

题目

设有如下变量定义: double a=3.500000;float b=2.5; int m=2,n=3; 则表达式“(float)(m+n)/2+(int)a%(int)b”的值是( )

A.2.5

B.3.5

C.4.5

D.表达式不正确


相似考题
更多“设有如下变量定义:doublea=3.500000;floatb=2.5;intm=2,n=3;则表达式“(float)(m+n)/2+(int)a%(in ”相关问题
  • 第1题:

    若有定义:int x=3,y=2;float a=2.5,b=3.5;则表达式(x+y)%2+(int)a/(int)b的值为


    1

  • 第2题:

    若有定义int x=3,y=2和float a=2.5,b=3.5,则表达式:(x+y)%2+(int)a/(int)b的值是


    1

  • 第3题:

    【单选题】若有定义:int m=7; float x=2.5, y=4.7; 则表达式x+m%3*(int)(x+y)%2/4的值是()。

    A.2.500000

    B.2.750000

    C.3.500000

    D.0.000000


    k%int (f)

  • 第4题:

    【判断题】假定已有变量定义语句:int m=3,n=2;,那么(float)(m/n)表达式的值是1.5。

    A.Y.是

    B.N.否


    错误

  • 第5题:

    【填空题】若有定义:int x=3,y=2;float a=2.5,b=3.5;则表达式(x+y)%2+(int)a/(int)b的值为【 】。


    B