ERROR!! Sum of series

This is the series here:
X+X^2/3!+X^3/5!+.......+X^n/(2N-1)!

I wrote the code but a compile time error occurs which says "call to the undefined function fact in the function main()"

PLS LEMME KNOW WHAT'S WRONG?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<iostream.h>
#include<conio.h>
#include<math.h>

int main()
{ int x,n,sum,term;
cout<<"Enter the value of x";
cin>>x;
cout<<"Enter number of terms";
cin>>n;
for (int i=1;i<=n;i++)
term=pow(x,i)/fact(2*n-1);
sum+=term;
return sum;
}
I answered your question here. No need to double-post.
http://cplusplus.com/forum/beginner/64811/

Topic archived. No new replies allowed.