Posts

Showing posts with the label algorithms

Program to perform divison operation of two numbers without using /, %, and modules operator

def devide(divisor, dividend)   quotient = 0   until(dividend < divisor) do     dividend -= divisor     quotient += 1   end   quotient end puts devide(15, 100)