#include<stdio.h>
int main()
{
int i, n;
float x, sum=1, t=1;
printf("-:EXPONENTIAL POWER SERIES:- \n\n");
printf("ENTER THE VALUE OF x of exp(x) SERIES: ");
scanf("%f",&x);
printf("ENTER THE LIMIT UPTO WHICH YOU WANT TO EXPAND THE SERIES: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
t=t*x/i;
sum=sum+t;
}
printf("\n THE VALUE OF Exp(%f) is : %.4f ",x, sum);
}
Execution
For students : you can download and use Dev c++ compiler for executing this program.