//1/(2*3)+2/(3*4)+…(n/((n+1)(n+2))
#include<iostream.h>
#include<conio.h>
float e(int k)
{
return (float)k/((k+1)*(k+2));
}
float s(int k)
{
if
(k==1) return (float)1/(2*3);
else return e(k)+s(k-1);
}
void main()
{
int n;
cout<<“n=”;cin>>n;
cout<<s(n)<<endl;
getch();
}
{module orizontal600}