Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In C programming : The exponential function is defined as the follow Taylor seri

ID: 3676791 • Letter: I

Question

In C programming :

The exponential function is defined as the follow Taylor series. The precise value of it is the limit of the following series as n goes to infinity. We can only approach the limit with finite steps (increasing the value of n). e^x=summation from infinity to n=0 x^n/n!=1+x+x^2/2!+x^3/3!+x^4/4!+... Write a C program to compute this exponential function at given point (x) with given number of steps (n). Compare your result with the"near precise"valueprovided bythemath library.You must define recursive f unction(s) to soIve this problem. The following is a sample output that I expect to see.

Explanation / Answer

#include<stdio.h>

#include<conio.h>

void main()

{

clrscr();

float x,sum,term;

int i,n;

sum=1;

term=1;

printf("enter the value of x and the number of terms n");

scanf("%f%d",&x,&n);

for(i=1;i<n;i++)

{

term=term*x/(float)i;

sum=sum+term;

}

printf(" the sum=%f number of term=%d value of x=%f ",sum,n,x);

getch();

}