Write a subroutine called HYPOT that computes the hypotenuse

Write a subroutine called HYPOT that computes the hypotenuse of a triangle whose sides have lengths pointed to by SI and DI. Return the result address in BP. The lengths are stored as words. Find the infinite series for SIN(X) in a calculus book and implement it in a subroutine called SIN. Use EPOWER as an example of how to do this.

Solution

This program has been implemented in Python.

First we write a subroutine that will convert the Words to Numbers.Which is as given below:-

SI=word2num(a) //Converting to numbers

DI-word2num(b)

c=math.pow(SI,2)+math.pow(DI,2)

return(num2words(math.sqrt(c))) //Returns the computed third side in string format back.

 Write a subroutine called HYPOT that computes the hypotenuse of a triangle whose sides have lengths pointed to by SI and DI. Return the result address in BP. T

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site