Square Root of a Number with Babylonian Method in C++

This program calculates the square root of a number with the babylonian method, what this does is finding the result by approximation.

I obtained the formula of Babylonian method from: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots

Here is my code and program working:

Screen Shot 2017-10-25 at 3.52.14 PM

And here is my full code:

https://github.com/getorres99/TC1017-Fall-IMT-GTO/blob/master/WSQ10.cpp

The normal consult book: “How to Think Like a Computer Scientist, C++ Version”, Downey, Allen B. 2012.

#WSQ10#lists#teclife

Deja un comentario