Babilonia 2004
CC licensed photo by EcoFotos Adilson Moralez on flickr.

This is a cool WSQ, in fact this was one of my favorites. Why? Because at first it was hard, nevertheless I did it! Honestly, it took me around two hours to finish this WSQ.

Any way, here is my code:

https://github.com/OctavioIRG/TC1017/commit/a2fc843ad2b3ba057b40c4b2f2becaebdf9f12f5

I thought it would be cool to show the user how the babilonian method starts aproximates to the actual value of the square root, thus I decided to print each cycle.  The cycle breaks when the last and current  value of the squareroot is the same. 🙂

CC BY 4.0 WSQ13 by Octavio Rojas is licensed under a Creative Commons Attribution 4.0 International License.