若有定义:int a=7;float x=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是?
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/05 19:29:08
若有定义:inta=7;floatx=2.5,y=4.7;则表达式x+a%3*(int)(x+y)%2/4的值是?若有定义:inta=7;floatx=2.5,y=4.7;则表达式x+a%3*(int
若有定义: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 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
=> 4.7 + 7 % 3 * (int) ( 2.5+4.7) % 2 / 4
=> 4.7 + 1 * (int) (7.2) % 2 / 4
=> 4.7 + 1 * 7 % 2 / 4
=>4.7 + 1 * 1 / 4
=>4.7 + 0
=>4.7
考查运算符以及类型转换.