Answer

A better initial value is one that would be closer to the true square root of ``X''. Perhaps initializing ``GUESS'' to ``X/2'' might be a better idea. Make the change and run the program a few times. Do we get better results this way?

Return to lesson.



Hamlet Project
hamlet@cs.utah.edu