求大神解答
#include <stdio.h>
int main()
{
? ? int a,b,c,d;
? ? double result;
? ? a = 1;
? ? b = 2;
? ? c = 3;
? ? d = 4;
? ? result =a+b-c-d; ? ?//在這里體驗哦~
? ? printf("%d\n", result);
? ? return 0;
}
為什么結果是-3916984
#include <stdio.h>
int main()
{
? ? int a,b,c,d;
? ? double result;
? ? a = 1;
? ? b = 2;
? ? c = 3;
? ? d = 4;
? ? result =a+b-c-d; ? ?//在這里體驗哦~
? ? printf("%d\n", result);
? ? return 0;
}
為什么結果是-3916984
2017-10-09
舉報
2017-10-09
?double是浮點型,應該改成int