
看看这题c++算π怎么算?4(1 - 1/3 + 1/5 - 1/7 + 1/9 - ... -1/(2n-1) + 1/(2n+1))
m(i)=4(1-1/3+1/5-1/7+1/9-...-1/(2n-1)+1/(2n+1))Writeafunctionthatreturnsm(n)withthefo...
m(i) = 4(1 - 1/3 + 1/5 - 1/7 + 1/9 - ... -1/(2n-1) + 1/(2n+1))
Write a function that returns m(n) with the following function head.
double pi(int n)
提示
You should submit the implementation of the function but do not submit the main() function. 展开
Write a function that returns m(n) with the following function head.
double pi(int n)
提示
You should submit the implementation of the function but do not submit the main() function. 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询