Program to find the value of exponential series




#include
#include
int main()
{
int n=0;
float x,e=1.0,y=1.0;
printf("\n Please Enter the Value of x: \n");
scanf("%f",&x);
do
{
n++;
y=y*x/n;
e=e+y;
}
while(n<10);
{printf("\n e^%f=%f",x,e);
}
getch();
return 0;
}




No comments:

Post a Comment