Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- write a program for evaluating e = sqrt(x+y) - sqrt(x-y)
- x+y and x-y need to be abs val first
- reqs:
- the main program reads Integers x, y, d
- a subroutine sqrt with argument n will approximate the result by repeteadly
- trying
- sqrt(n) = m, m being the max value
- n - m^2 <= d
- a subroutine mod(n) that returns
- n if n >= 0
- -n if n < 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement