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 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
Get step-by-step solutions from verified subject matter experts
