Home > Back-end >  Something wrong, the result is always wrong
Something wrong, the result is always wrong

Time:06-04

God, please grant instruction

CodePudding user response:

Uninitialized temp, while all didn't go in

CodePudding user response:

Initialization is 1, the result is 2.718282, why not?

CodePudding user response:

You this value is more accurate than the given, is based on that it requires more calculation step the results
Because you are added the results first, then to judge, so much a step
While (1) {
The term *=I;
i++;
Temp=f/term;
If (temp<1.0 e-5) break;
S +=temp;
Printf (" I=% d, % s=lf \ n ", I, s);
};
And the answer just the way they are

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related