diff --git a/pretext/Functions/DefiningFunctions.ptx b/pretext/Functions/DefiningFunctions.ptx index 55d66e0..ffde462 100644 --- a/pretext/Functions/DefiningFunctions.ptx +++ b/pretext/Functions/DefiningFunctions.ptx @@ -78,16 +78,15 @@ int main() { takes a value n and repeatedly guesses the square root by making each newguess the oldguess in the subsequent iteration. The initial guess used here is \frac {n}{2}. - Listing 1 shows a function definition that accepts a value + shows a function definition that accepts a value n and returns the square root of n after making 20 guesses. Again, the details of Newton's Method are hidden inside the function definition and the user does not have to know anything about the implementation to use the function for its intended purpose. - Listing 1 also shows the use of the // characters as a comment + also shows the use of the // characters as a comment marker. Any characters that follow the // on a line are ignored.

- -

Listing 1 - + +

// returns the square root of a number as a double @@ -113,7 +112,7 @@ int main() { } -

+