为什么我把double result 改成 int result过后,结果是0?
#include <stdio.h>
int main()
{
int a,b,c,d;
int result;
a = 1;
b = 2;
c = 3;
d = 4;
result = a + b + c / d; //在这里体验哦~
printf("%f\n", result);
return 0;
}
#include <stdio.h>
int main()
{
int a,b,c,d;
int result;
a = 1;
b = 2;
c = 3;
d = 4;
result = a + b + c / d; //在这里体验哦~
printf("%f\n", result);
return 0;
}
2019-07-20
举报