/**
 * In this fashion design exercise, you are given the number of boutiques, the number of boutiques you have visited so far, and your shopping budget.
 * Your task is to write a code that determines whether you should exit the while loop based on certain conditions.
 *
 * @param numBoutiques The total number of boutiques
 * @param boutiqueVisits The number of boutiques you have visited
 * @param shoppingBudget Your budget for shopping
 * @return True if you should exit the loop, False otherwise
 */
fun completeTask(numBoutiques: Int, boutiqueVisits: Int, shoppingBudget: Int): Boolean {

    var visits = boutiqueVisits
    var budget = shoppingBudget

    while (visits < numBoutiques) {
        print("Enter the budget needed for the next boutique: ")
        val budgetNeeded = readLine()!!.toInt()
        if (budgetNeeded > budget) {
            println("You don't have enough budget to continue shopping!")
            return true
        } else {
            println("You can still shop at the next boutique!")
            visits++
            budget -= budgetNeeded
        }
    }

    println("You have visited all the boutiques!")
    return false
}

// Example usage
val numBoutiques = 5
val boutiqueVisits = 0
/**
 * In this fashion design exercise, you are given the number of boutiques, the number of boutiques you have visited so far, and your shopping budget.
 * Your task is to write a code that determines whether you should exit the while loop based on certain conditions.
 *
 * @param numBoutiques The total number of boutiques
 * @param boutiqueVisits The number of boutiques you have visited
 * @param shoppingBudget Your budget for shopping
 * @return True if you should exit the loop, False otherwise
 */
fun completeTask(numBoutiques: Int, boutiqueVisits: Int, shoppingBudget: Int): Boolean {
/**
 * In this fashion design exercise, you are given the number of boutiques, the number of boutiques you have visited so far, and your shopping budget.
 * Your task is to write a code that determines whether you should exit the while loop based on certain conditions.
 *
 * @param numBoutiques The total number of boutiques
 * @param boutiqueVisits The number of boutiques you have visited
 * @param shoppingBudget Your budget for shopping
 * @return True if you should exit the loop, False otherwise
 */
fun completeTask(numBoutiques: Int, boutiqueVisits: Int, shoppingBudget: Int): Boolean {

    var visits = boutiqueVisits
    var budget = shoppingBudget

    while (visits < numBoutiques) {
        print("Enter the budget needed for the next boutique: ")
        val budgetNeeded = readLine()!!.toInt()
        if (budgetNeeded > budget) {
            println("You don't have enough budget to continue shopping!")
            return true
        } else {
            println("You can still shop at the next boutique!")
            visits++
            budget -= budgetNeeded
        }
    }

    println("You have visited all the boutiques!")
    return false
}

// Example usage
val numBoutiques = 5
val boutiqueVisits = 0