Fast Enterprises Interview Question

Write a program to multiply/divide without using multiplications/division symbols

Interview Answer

Anonymous

May 23, 2019

int multiply(int a, int b) { int product = 0; boolean neg = false; if(b = 0 ) { num = num - den; quotient++; } if(neg == 1) //odd number of negative sign, quotient must be negative return (0 - quotient); return quotient; }