Question: Write an algorithm in which you would like to divide two numbers and return quotient and remainder: Divide X by Y and return q andr

 Write an algorithm in which you would like to divide two

Write an algorithm in which you would like to divide two numbers and return quotient and remainder: Divide X by Y and return q andr In a different word, you are writing X as below: X = q Y+r In this algorithm you will be using subtraction as the basis. You are not allowed to use division operator! Assume that (x) and (Y) are both integers greater than zero and (X) is greater or equal to (Y) (X>=Y)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!