public
/
Ack-5.5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Pristine Ack-5.5
[Ack-5.5.git]
/
lang
/
basic
/
test
/
opg2.b
1
100 rem Square root program (47)
2
110 rem this program uses the newton raphson
3
120 rem technique to calculate the square root
4
130 read a,e
5
140 let x =(a+2)/3
6
150 let x1= (x+a/x)*.5
7
160 rem determine absolute value of x1-x
8
170 let n= x1-x
9
180 if n>= 0 then 200
10
190 let n= 0-n
11
200 if n<e then 230
12
210 let x=x1
13
220 goto 150
14
230 print "square root of",a,"equals",x1
15
240 end
16
250 data 81, .01