若有定义“int a=7;float x=2.5,y=4.7;”,则表达式x+a%3*(int)(x+y)%2/4的值是多
人气:332 ℃ 时间:2019-10-25 01:04:48
解答
按如下顺序运算:
(x+y) = 7.2
(int)(x+Y) = 7
a%3 = 1
a%3*(int)(x+y)%2/4 = 1*7%2/4 = 7%2/4 = 1/4 = 0(注意,所有变量均是Int型)
x+0 = 2.5
所以答案是2.5
推荐
- 若有定义:int a=7;float x=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是
- 若有定义:int a=7;float x=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是
- 15.若有定义:int a=7;float x=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是( )
- 若有定义语句int a=7;float x=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值为多少
- 若有定义:int x=3,y=2;float a=2.5,b=3.5;则下面表达式的值为
- 我的母亲课后习题第三题的完美答案啊!300字就够了
- 国内主要高原的海拔
- 已知点M(-2,0)N(2,0)动点P满足条件绝对值PM-绝对值PN=2倍根号2,记动点P的轨迹为C,求C的方程
猜你喜欢