二级C语言问题,答对了再给分,谢谢
int b=7,float a=2.5,c=4.7
则表达式a+(int)(b/3*(int)(a+c)/2)%4的值为?
请写出计算过程答对了再给分,谢谢
参考答案:a+c = 2.5+4.7 = 7.2
(int)(a+c) = (int)7.2 = 7
b/3*(int)(a+c)/2 = 7/3*7/2 = 2*7/2 = 7
(int)(b/3*(int)(a+b)/2)%4 = (int)7%4 = 3
a+(int)(b/3*(int)(a+b)/2)%4 = 2.5 + 3 = 5.5