function divide($a, $b)
{
$divisor = $b;
if ($b > $a) {
return 0;
}
$res = 1;
while (($b + $b) <= $a) {
$b += $b;
$res += $res;
}
return $res + divide($a - $b, $divisor);
}
Last active
June 10, 2016 12:23
-
-
Save jougene/e1359ae72a21f721374945ac7c091eec to your computer and use it in GitHub Desktop.