The following series summation is an approximation for computing the natural logarithm of a floatingpoint
value x:
logx=[(x-1)]–[[(x-1)^2]/2]+[[(x-1)^3]/3]–[[(x-1)^4]/4]+….+(-1)n+1(x-1)^n/n
Where 2 >= x > 0 and n is a positive integer.
Design and implement an interactive program that does the following:
1. Prompts the user to enter a floating-point value for x and reads it.
2. Ensures that x is in the proper range; if not, re prompts the user to enter another value.
value x:
logx=[(x-1)]–[[(x-1)^2]/2]+[[(x-1)^3]/3]–[[(x-1)^4]/4]+….+(-1)n+1(x-1)^n/n
Where 2 >= x > 0 and n is a positive integer.
Design and implement an interactive program that does the following:
1. Prompts the user to enter a floating-point value for x and reads it.
2. Ensures that x is in the proper range; if not, re prompts the user to enter another value.
Comment