关于二C的问题,答对了再给分,谢谢
int x=3,y=2;float a=2.5,b=3.5
则表达式(x+y)%2+(int)a/(int)b的值为?
请说明怎么算的,答对了再给分,谢谢
参考答案:(x+y)%2=5%2=1
(int)a/(int)b=2/3=0
所以(x+y)%2+(int)a/(int)b=1
int x=3,y=2;float a=2.5,b=3.5
则表达式(x+y)%2+(int)a/(int)b的值为?
请说明怎么算的,答对了再给分,谢谢
参考答案:(x+y)%2=5%2=1
(int)a/(int)b=2/3=0
所以(x+y)%2+(int)a/(int)b=1