#include <stdio.h>int main(){ int x,y; x = 10; y = 4.0; printf("x/y=%f\n", x/y ); return 0; }此时输出的值为什么是0.000000????#include <stdio.h>int main(){ float x,y; x = 10; y = -3; printf("x+y=%d\n",x+y); printf("x-y=%d\n",x-y); printf("x*y=%d\n",x*y); printf("x/y=%d\n",x/y); printf("x%y=%d\n",x%y); return 0; }这个为什么不能输出???但把float改为int就好了????感谢大佬!!!!
- 3 回答
- 0 关注
- 1612 浏览
添加回答
举报
0/150
提交
取消