Time:10-07
CodePudding user response:
directly according to the last general formula coding
Quote: refer to 1st floor small cypress childe response: directly according to the last general formula coding I feel I don't understand the question, and if n is 3, is directly into the final formula inside, and then calculate a
Quote: refer to 4th floor weixin_46338679 response: Quote: refer to 1st floor small cypress childe response: directly according to the last general formula coding I feel I don't understand the question, and if n is 3, is directly into the final formula inside, and then calculate a No, this formula is all and ah
double fun (double x, int n) {Double cosx=1; Double d=1; For (int I=1; I & lt;=n; + + I) {D *=(1) * * x (x)/((2 * I - 1) * (2 * I)); Cosx +=d; } Return cosx; }
Page link:https//www.codepudding.com/Backend/55806.html