> 其他 >
若有定义语句int a=7;float x=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值为多少
人气:311 ℃ 时间:2019-10-19 21:17:36
解答
(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
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版