class DivideUsingSubtraction {

  public float divideIterative(int dividend, int divider) {
    validateInput(divider);
    float result = 0;
    while (dividend > divider) {
      dividend -= divider;
      result++;
    }
    float decimalPart = (float) dividend / (float) divider;
    result += decimalPart;
    return result;
  }

}