--Originally published at Solving Problems with Programming
So in this twelve week class I started with doing this WSQ10 I started reviewing in creating and calling functions in C++.#Mastery06, #Mastery07, #Mastery16 Use of recursion for repetitive algorithms, #Mastery17 When to use what type of repetition in a program, #Mastery18 Creation and use of Arrays/ Vectors in C++. Futhermore, in this stage I have all the topics of the course from 1 to 20.
What I did for this numeric program is solving the problem to the user by creating a program with writing a function to calculate the square root of a number using the Babylonian method. You can search for that method, it will be easy to find. Hence, you can have it here in the survey that we did last week:
Then, we need that this 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.
Hence, the resources I need it to solve this program are here:
ken bauer
Similar code provided by Xochitl96
The following photograph shows the solution to this problem:
So at first I wrote the same structure of the program just did the same as what i did in Hello World: Second Class, Second Blog (Blog of the second class 12/01/17) and Hello World.cpp, #WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp, #WSQ02 Post Temperature 23/01/17 and WSQ02.cpp, #WSQ03 Post Pick a Number 23/01/17 and WSQ03.cpp, #WSQ04 Post Sum of Numbers 23/01/17 and WSQ04.cpp, #WSQ05 Six Tutorial On To Functions 12/02/17 and WSQ05.cpp, #WSQ06 Factorial Calculator 12/02/17 and WSQ06.cpp, #WSQ07 Lists 03/03/17 and WSQ07.cpp, #WSQ08 Yo soy 196 11/03/17 and WSQ08. Continue reading "#WSQ10 Babylonian Method 21/03/17 and WSQ10.cpp"