РОТА – нота – нора – пора – пола – ПОЛК
#include <iostream>
using namespace std;
int factor(int n);
double sum(int n);
int main()
{
<span> int n;</span>
do
<span> {</span>
<span> cout
<< "Enter correct input data (>0)" << endl;</span>
<span> cin
>> n;</span>
<span> } while
(n<0);</span>
<span> cout
<< sum(n) << endl;</span>
<span> system("pause");</span>
<span> return 0;</span>
}
int factor(int n)
{
<span> int res =
1;</span>
<span> for (int i
= 1; i <= n; i++)</span>
<span> res
*= i;</span>
<span> return res;</span>
}
double sum(int n)
{
<span> double res
= 0;</span>
<span> for (int i
= 1; i <= n; i++)</span>
<span> res
+= ((double)factor(i) / factor(n + i));</span>
<span> return res;</span>
} <span> </span>