/**
 * This function calculates the total cost for a veterinarian based on the number of visits and the cost per visit.
 *
 * @param num_of_visits The number of visits to the veterinarian.
 * @param cost_per_visit The cost per visit to the veterinarian.
 * @return The total cost for the veterinarian.
 *
 * Example:
 * calculateTotalCost(3, 50.0) // 150.0
 * calculateTotalCost(5, 30.0) // 150.0
 */
fun calculateTotalCost(numOfVisits: Int, costPerVisit: Double): Double {

    var totalCost = 0.0

    // Outer loop representing the number of visits
    repeat(numOfVisits) {
        // Inner loop representing the number of items to subtract from the total cost
        for (i in 1..numOfVisits) {
            totalCost -= costPerVisit
            println("With $i items subtracted, the total cost is now: $totalCost")
        }
    }

    return totalCost
}
/**
 * This function calculates the total cost for a veterinarian based on the number of visits and the cost per visit.
 *
 * @param num_of_visits The number of visits to the veterinarian.
 * @param cost_per_visit The cost per visit to the veterinarian.
 * @return The total cost for the veterinarian.
 *
 * Example:
 * calculateTotalCost(3, 50.0) // 150.0
 * calculateTotalCost(5, 30.0) // 150.0
 */
fun calculateTotalCost(numOfVisits: Int, costPerVisit: Double): Double {
/**
 * This function calculates the total cost for a veterinarian based on the number of visits and the cost per visit.
 *
 * @param num_of_visits The number of visits to the veterinarian.
 * @param cost_per_visit The cost per visit to the veterinarian.
 * @return The total cost for the veterinarian.
 *
 * Example:
 * calculateTotalCost(3, 50.0) // 150.0
 * calculateTotalCost(5, 30.0) // 150.0
 */
fun calculateTotalCost(numOfVisits: Int, costPerVisit: Double): Double {

    var totalCost = 0.0

    // Outer loop representing the number of visits
    repeat(numOfVisits) {
        // Inner loop representing the number of items to subtract from the total cost
        for (i in 1..numOfVisits) {
            totalCost -= costPerVisit
            println("With $i items subtracted, the total cost is now: $totalCost")
        }
    }

    return totalCost
}