public static double getRecursion(double total, double each, double rate) {
if (total <= each){
return total;
}
return getRecursion(total - (each - (total * rate)), each, rate) ;
}
if (total <= each){
return total;
}
return getRecursion(total - (each - (total * rate)), each, rate) ;
}