> 其他 >
5.编写程序,设a=2,b=3,x=3.5,y=2.5计算并输出算术表达式(float)(a+b)/2+(int)x%(
4. 编写程序,设x=2.5,a=7,y=4.7计算并输出算术表达式x+a%3*(x+y)%2/4的值.
人气:280 ℃ 时间:2020-04-19 16:15:06
解答
#include
main() {
float x = 2.5,a = 7,y = 4.7;
printf("%f",x + a%3*(x+y)%2/4);
}
#include
main() {
int a =2,b=3;
float x=3.5,y=2.5;
printf("%f",(float)(a+b)/2 + (int)x%y);
}
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版