int a=3,b=4,c;c=1/2*(a+b)运行后c的值为什么是0

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 11:02:53
int a=3,b=4,c;c=1/2*(a+b)运行后c的值为什么是0

int a=3,b=4,c;c=1/2*(a+b)运行后c的值为什么是0
int a=3,b=4,c;c=1/2*(a+b)运行后c的值为什么是0

int a=3,b=4,c;c=1/2*(a+b)运行后c的值为什么是0
int c你把c定义为整数了.程序自动取整