/*This is a program for evaluating the series : 1+x/2+x^2/3+x^3/4+....+x^n/n+1.*/ main() { float x,n,v,p; clrscr(); printf("\n\n\t\tThis program will help you to evaluate the series :\n\t\t1+x/2+x^2/3+x^3/4+.....+x^n/n+1."); printf("\n\t\tEnter the value of 'x' in the series : "); scanf("%f",&x); printf("\n\t\tEnter the value of 'n' in the series : "); scanf("%f",&n); v=2; p=1; while(v<(n+2)) { p=p+x/v; v++; x=x*x; } printf("\n\t\tThe answer of the series is : %f.",p); getch(); }