#include <iostream.h> #include <math.h> #include<conio.h> void main() { float Term, Term1,Diff,Sum,X; int N,I; clrscr(); do { N=1; cout<<"Enter the value of X\n"; cin>>X; cout<<"Value of X ="<<X<<" "; Term = X; Sum = 1 + Term; I = 2; do { Term1 = X * (Term/I); I = I + 1; Sum = Sum + Term1; Diff = fabs(Term1 - Term); cout<<"Sum ="<<Sum<<" Diff=" <<Diff<<"\n" Term=Term1; } while (Diff>(0.1e-11)); cout<<"Sum of the Series "<<Sum<<"\n"; N=N+1; } while (N>2); getch(); }