I search in some websites and videos to understand how to write the code. It explains very good how does it works.

These are the website and video that helped me:

Here it is my code: https://github.com/Andreandc/TC1017/blob/master/WSQ13

img_heron-square-root

CC BY 4.0 WSQ13 -Babylonian Method by Andrea Ac is licensed under a Creative Commons Attribution 4.0 International License.