0

hi guys

I want help in solving this question

the power series for In(x) ( 0<x<2) for up to 1000 terms is:

In(x)=(x-1)-(x-1)^2/2+(x-1)^3/3-(x-1)^4/4.......-(x-1)^1000/1000

write the C++ code of the tWo functions GetValueofvar() and GetLogofVar(var) in the following main program:

void main(){
         double var;
         double x;
         var=GetValueofvar();
         x=GetLogofVar(var);
}

where
get value of var() returns the value for which the In will be calculatd. within this function, the user should be prompoted to enter the value of var
_getlogoVar(var) returns the value of In(x) as approximated in equation of In(x) above

Edited by mike_2000_17: Fixed formatting

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by VernonDozier
0

that looks like the log function, "L"n (LN) not "I"n (IN). That should be a good place to start. You seem not to have attempted to write that part of the code at all. Give it a shot and let us know how it goes.

Dave

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.