Advertisement
regzarr

cet_Test1_reqs

Nov 5th, 2024
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. write a program for evaluating e = sqrt(x+y) - sqrt(x-y)
  2. x+y and x-y need to be abs val first
  3. reqs:
  4. the main program reads Integers x, y, d
  5. a subroutine sqrt with argument n will approximate the result by repeteadly
  6. trying
  7. sqrt(n) = m, m being the max value
  8. n - m^2 <= d
  9.  
  10. a subroutine mod(n) that returns
  11. n if n >= 0
  12. -n if n < 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement