Google Interview Question

Write a program to divide two operands with the use of "/" operator.

Interview Answer

Anonymous

Sep 15, 2013

public double divide (int a, int b) { double logValue = Math.log10(a) - Math.log10(b); return Math.pow(10, logValue); }