******************
*   roots   *
*************
store 1.0000000 to root
store "         " to number
set talk off
erase
store t to enter
do while enter
@ 10,3 say "ENTER NUMBER TO BE ROOTED " get number picture '9999999999'
read
@ 15,3
if "-"$number
   @ 15,3 say "NO '-' IN THE ENTRY PLEASE"
   loop
endif
if &number > 9999999999
   @ 15,3 say "NUMBER IS TOO LARGE"
   loop
endif
if &number < 0
   @ 15,3 say "ERROR IN THE ENTRY"
   loop
endif
store f to enter
enddo enter
if &number = 0
   @ 15,3 say "ROOT = 0"
   store f to b
else
   store t to b
endif
do while b
   store &number/(root*root) - 1 to c
   if c<0
      store c*(-1) to c
   endif
   if c < 0.0000001
      @ 15,3 say "ROOT= "
      @ 20,15 say root
      store f to b
   else
      store (&number/root+root)/2 to root
      store t to b
   endif
enddo
return
