/**
 * This function calculates the remaining number of books in the library after considering the borrowed and returned books.
 *
 * @param library The initial number of books in the library.
 * @param borrowedBooks The number of books that were borrowed from the library.
 * @param returnedBooks The number of books that were returned to the library.
 * @return The remaining number of books in the library.
 */
fun calculateRemainingBooks(library: Int, borrowedBooks: Int, returnedBooks: Int): Int {

    var remainingBooks = library

    // Using division assignment operator to update the number of books in the library
    remainingBooks /= borrowedBooks

    // Loop to iterate over the returnedBooks and update the library count accordingly
    repeat(returnedBooks) {
        remainingBooks *= 3
    }

    return remainingBooks
}
/**
 * This function calculates the remaining number of books in the library after considering the borrowed and returned books.
 *
 * @param library The initial number of books in the library.
 * @param borrowedBooks The number of books that were borrowed from the library.
 * @param returnedBooks The number of books that were returned to the library.
 * @return The remaining number of books in the library.
 */
fun calculateRemainingBooks(library: Int, borrowedBooks: Int, returnedBooks: Int): Int {
/**
 * This function calculates the remaining number of books in the library after considering the borrowed and returned books.
 *
 * @param library The initial number of books in the library.
 * @param borrowedBooks The number of books that were borrowed from the library.
 * @param returnedBooks The number of books that were returned to the library.
 * @return The remaining number of books in the library.
 */
fun calculateRemainingBooks(library: Int, borrowedBooks: Int, returnedBooks: Int): Int {

    var remainingBooks = library

    // Using division assignment operator to update the number of books in the library
    remainingBooks /= borrowedBooks

    // Loop to iterate over the returnedBooks and update the library count accordingly
    repeat(returnedBooks) {
        remainingBooks *= 3
    }

    return remainingBooks
}