不應該是12.500000嗎?
#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("%f\n", result);
??? return 0;
}
#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("%f\n", result);
??? return 0;
}
2016-01-23
舉報
2016-01-23
'/'這個符號呢在程序語言中是只求商不求余數(shù)的,也就是說,在題目里面,a/b=1/2=0,不是0.5,所以最后的答案應該是12