class DivideUsingSubtraction {

  public float divideRecursive(int dividend, int divider) {
    validateInput(divider);
    if (dividend == 0) {
      return 0f;
    } else if (dividend < divider) {
      return (float) dividend / (float) divider;
    } else {
      return 1f + divideRecursive(dividend - divider, divider);
    }
  }

}