Example C Program to find the SERIES [ 1+X+X^2/2!+X^3/3!+....]

Code:
#include<stdio.h>
#include<conio.h>
void main()
{
float x = 0.0,TOT = 0.0,TEMP = 0.0;

int i = 0, n = 0;

clrscr();

printf("enter the Value of x and (n) \t :");

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

TOT =1; TEMP = 1;

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

  TEMP = TEMP*x/(float)i;
  
  TOT =TOT+ TEMP;
}

printf("\n%f\t%d\t%f\n",TOT,n,x);

getch ();
}