#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就好了????
感谢大佬!!!!
weibo_越丑越调皮_
相关分类