Write a program to evaluate the series
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
clrscr();
float n,x,a,b,p,f,sum=1;
printf("Please Enter the value of x:= ");
scanf("%f",&x);
printf("Please Enter the value of n:= ");
scanf("%f",&n);
for(a=1;a<=n;a++)
{
p=pow(x,a);
f=1;
for(b=1;b<=a;b++)
f=f*b;
sum=sum+(p/f);
}
printf("Result= %.2f",sum);
getch();
}
#include<conio.h>
#include<math.h>
main()
{
clrscr();
float n,x,a,b,p,f,sum=1;
printf("Please Enter the value of x:= ");
scanf("%f",&x);
printf("Please Enter the value of n:= ");
scanf("%f",&n);
for(a=1;a<=n;a++)
{
p=pow(x,a);
f=1;
for(b=1;b<=a;b++)
f=f*b;
sum=sum+(p/f);
}
printf("Result= %.2f",sum);
getch();
}