#include <stdio.h>
#include <stdlib.h>
int fact(int);
int main()
{
int n,total=1,i;
printf("enter the series limit: ");
scanf("%d",&n);
total=total+n;
for(i=2;i<=n;i+=2)
{
total=total+(pow(n,i)\fact(i));
}
printf("%d",total);
return 0;
}
int fact(int c)
{
int j=1;
int facto=1;
for(j=1;j<=c;j++)
{
facto=facto*j;
}
return facto;
}
my output should be like this
1+n+nn\2!+nnnn\4!
the error says at line 12:syntax before fact