Home > Back-end >  Please judge whether the following function PI meet PI/2=1 1/3 1/3 1/3 2/5 * * * 2/5 3/7... Consult!
Please judge whether the following function PI meet PI/2=1 1/3 1/3 1/3 2/5 * * * 2/5 3/7... Consult!

Time:03-16

# include "stdio.h"
Double PI (double t)
{
Double sum=1, m=1, n. Double s=1;
For (n=1; N <=t; N++)
{
M=n/(2 * n + 1);
S=s * m
Sum=sum + s;
}
Return (sum * 2);
}
  • Related