求大佬解释一下编程里的除法问题
int a=3;
int b=4;
double c=a/b;
double d=(double)a/(double)b;
printf("%f",c);
printf("%f",d);
为什么c值为0.000000,d值为0.750000?
int a=3;
int b=4;
double c=a/b;
double d=(double)a/(double)b;
printf("%f",c);
printf("%f",d);
为什么c值为0.000000,d值为0.750000?
2019-03-16
举报