#include
using namespace std;
int factor(int n);
double sum(int n);
int main()
{
int n;
do
{
cout
<< "Enter correct input data (>0)" << endl;</span>
cin
>> n;
} while
(n<0);</span>
cout
<< sum(n) << endl;</span>
system("pause");
return 0;
}
int factor(int n)
{
int res =
1;
for (int i
= 1; i <= n; i++)</span>
res
*= i;
return res;
}
double sum(int n)
{
double res
= 0;
for (int i
= 1; i <= n; i++)</span>
res
+= ((double)factor(i) / factor(n + i));
return res;
}