In this WSQ #13 we had to write a program which do the following:
“The function should receive a number and return floating point number. Obviously you should test your function, so create a main program that asks the user a value, calculates the square root and displays that.”
So I had to do some research and a really cool video in Youtube help me a lot! From the tutorial I just had to change double to float and put a “Cin” so the user could type in the number that he wants.
This is the tutorial that helped me out!
And as always, Clic on Batman to see my code!
Here is a screenshot of the program running:
Stay true!
-The Admin.
]]>
The calculation of square roots with the Babylonian Method is quite interesting and demonstrates the awesomness of math. You can check out how this method works here.
For this WSQ, I used this webpage as a guide.
And you can check out my code here.
]]>The calculation of square roots with the Babylonian Method is quite interesting and demonstrates the awesomness of math. You can check out how this method works here.
For this WSQ, I used this webpage as a guide.
And you can check out my code here.
]]>