I dont really understand what to do next to make this work....
Please help me out..
Thanks
Flow chart. That's what you need.
[tex]x_{n+1} = \frac{1}{2}(x_{n}+\frac{a}{x_{n}})[/tex]
Let's pretend you are trying to find the square root of 25. Thus in your formula abovea would be 25. That never changes. x is the variable that gets updated.
a = 25
x = 100 // arbitary start value you can choose any number
//while condition
x = 0.5 * (x + ( a / x ))
end while
print x
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439