发布网友 发布时间:2024-10-04 12:24
共1个回答
热心网友 时间:2024-10-26 18:37
#include <stdio.h>
int main(void)
{
int n,count;
float i,t,sum=1;
printf("输入想求得前几项的值:");
scanf("%d", &n);
for(i=2,t=1,count=1;count<n;count++,i+=2,t+=2)
{sum=(i/t)*(i/(t+2))*sum;}
printf("前%d项的值为%f\n", n,2*sum);
return 0;
}