/**
 * The function takes a list of revenue generated by different products and calculates the total sales after applying tax.
 *
 * @param revenueList A list of revenues generated by different products.
 * @param taxRate The tax rate to be applied.
 * @return The total sales after applying tax.
 *
 * Example:
 * calculateTotalSales(listOf(1000, 2000, 3000), 0.12) returns 5040.0
 */
fun calculateTotalSales(revenueList: List<Int>, taxRate: Double): Double {

    var totalSales = 0.0

    // Iterate over each revenue in the list
    for (revenue in revenueList) {
        // Apply tax to the revenue and add to the total sales
        totalSales += revenue * (1 + taxRate)
    }

    return totalSales
}
/**
 * The function takes a list of revenue generated by different products and calculates the total sales after applying tax.
 *
 * @param revenueList A list of revenues generated by different products.
 * @param taxRate The tax rate to be applied.
 * @return The total sales after applying tax.
 *
 * Example:
 * calculateTotalSales(listOf(1000, 2000, 3000), 0.12) returns 5040.0
 */
fun calculateTotalSales(revenueList: List<Int>, taxRate: Double): Double {
/**
 * The function takes a list of revenue generated by different products and calculates the total sales after applying tax.
 *
 * @param revenueList A list of revenues generated by different products.
 * @param taxRate The tax rate to be applied.
 * @return The total sales after applying tax.
 *
 * Example:
 * calculateTotalSales(listOf(1000, 2000, 3000), 0.12) returns 5040.0
 */
fun calculateTotalSales(revenueList: List<Int>, taxRate: Double): Double {

    var totalSales = 0.0

    // Iterate over each revenue in the list
    for (revenue in revenueList) {
        // Apply tax to the revenue and add to the total sales
        totalSales += revenue * (1 + taxRate)
    }

    return totalSales
}