CodePudding user response:
Here to consider data types, it is recommended to use doubleFactorial calculation can be used the next value multiplied above a factorial
Double s=0, a=1;
for(int i=1; i<=n; I++)
{
A=a * I;
S +=1.0/a;
}
Cout & lt;
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html