#include <stdio.h>
#include <math.h>
int main()
float i, x;
double fact=0, sum=0;
printf("Enter value of x as the power of e: ");
scanf("%f", &x);
printf("Enter n as the number of terms: ");
scanf("%d",&i);
for (i = 0; i < 99999; i++)
{
sum = 1 + x;
fact = fact * i;
sum = sum + pow(x, i)/(fact);
}
if (sum == sum)
printf("The value of e^%f is %lf",x,sum);
return 0;