Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

#include <iostream>

using namespace std;


float n;
float s(int k,int p)
{
if(k==p) return 1./(1+2*k);
else return s(1./(1+2*k),(1./(1+2*p))-1)+1./(1+2*p);
}
int main()
{
//cout << "n=";
// cin>>n;
cout<<"s="<<s(1,10);
return 0;
}

You might also like