/**
 * Given a dividend and a divisor, this function implements division using a while loop.
 * It returns the quotient (result of division).
 *
 * @param dividend The number to be divided (numerator).
 * @param divisor The number by which the dividend is divided (denominator).
 * @return Quotient (result of division).
 *
 * Example:
 * divisionLoop(10, 3) // 3
 */
fun divisionLoop(dividend: Int, divisor: Int): Int {

    var quotient = 0
    var tempDividend = dividend
    while (tempDividend >= divisor) {
        tempDividend -= divisor
        quotient++
    }
    return quotient
}
/**
 * Given a dividend and a divisor, this function implements division using a while loop.
 * It returns the quotient (result of division).
 *
 * @param dividend The number to be divided (numerator).
 * @param divisor The number by which the dividend is divided (denominator).
 * @return Quotient (result of division).
 *
 * Example:
 * divisionLoop(10, 3) // 3
 */
fun divisionLoop(dividend: Int, divisor: Int): Int {
/**
 * Given a dividend and a divisor, this function implements division using a while loop.
 * It returns the quotient (result of division).
 *
 * @param dividend The number to be divided (numerator).
 * @param divisor The number by which the dividend is divided (denominator).
 * @return Quotient (result of division).
 *
 * Example:
 * divisionLoop(10, 3) // 3
 */
fun divisionLoop(dividend: Int, divisor: Int): Int {

    var quotient = 0
    var tempDividend = dividend
    while (tempDividend >= divisor) {
        tempDividend -= divisor
        quotient++
    }
    return quotient
}