![](https://i-blog.csdnimg.cn/blog_migrate/8c3101301151ae7d2ee7c6e5139d59f2.png)
求f(x,n)是c语言程序
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr(); //to clear the screen
int i,n;
float x,sum=0;
cout<<“x+x^2/2+x^3/3+…..+x^n/n”;
cout<<“nEnter value of x and n:”;
cin>>x>>n;
for(i=1;i<=n;++i)
sum+=pow(x,i)/i;
cout<<“nsum=”<<sum;
getch(); //to stop the screen
}
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr(); //to clear the screen
int i,n;
float x,sum=0;
cout<<“x+x^2/2+x^3/3+…..+x^n/n”;
cout<<“nEnter value of x and n:”;
cin>>x>>n;
for(i=1;i<=n;++i)
sum+=pow(x,i)/i;
cout<<“nsum=”<<sum;
getch(); //to stop the screen
}
翻译自: https://www.thecrazyprogrammer.com/2012/08/c-program-to-find-sum-of-series.html
求f(x,n)是c语言程序