repo.or.cz
/
williamcminus.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
finished 19 (not fully tested...)
[williamcminus.git]
/
assign6
/
repeat.txt
blob
63c877a7bb099fed7a387d5c77e4199b19c61b74
1
BEGIN {Calculate the square root of 4 using Newton's method.}
2
number := 4;
3
root := number;
4
5
REPEAT
6
partial := number/root + root;
7
root := partial/2
8
UNTIL root*root - number < 0.000001
9
END.