标签:ble scan clu printf can while turn eps i+1
#include <stdio.h>
int main()
{
double eps;
double sum=1.0,k=1.0;
int i=1;
scanf("%lf",&eps);
while (k>=eps)
{
k=k*i/(2*i+1);
sum=k+sum;
i++;
}
printf("PI = %.5f",sum*2);
return 0;
}
标签:ble scan clu printf can while turn eps i+1
原文地址:https://www.cnblogs.com/DEAKY/p/11922505.html