ECOR 1606 Fall 2009 Lab #1
Students are to hand execute all of the following algorithms with the specified inputs, create a
text file called “
lab1.txt
” containing the step by step results (i.e. show your work), and submit
this file as lab #1 for their lab section to gain experience with the “submit” system, and to prove
their attendance at the lab. They are also to produce a flowchart for each algorithm and have
these flowcharts checked by a TA before leaving the lab.
Optional:
If students have time left at the end, they can experiment with rewriting their
flowcharts using a flowchart drawing tool:
http://www.drawanywhere.com
.
Instructions to get
started can be found in provided file “
drawanywhere.html
”.
1. Finding the square root of a number:
Algorithm:
write "1"
at the top of a piece of paper
compute 0.5 * (1 + number)
write this value below the
"1"
while
(the last two values on the paper are more than 0.00001 apart)
do
compute 0.5 * ( last value on paper + ( number / last value on paper ) )
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 duke
 Decimal, cent stamps

Click to edit the document details