/**
 * Given two arrays of revenue and expenses for each month,
 * calculate the total income for the specified period.
 *
 * @param revenueArray The array containing the revenue for each month.
 * @param expensesArray The array containing the expenses for each month.
 * @return The total income for the specified period.
 *
 * Example:
 * calculateTotalIncome(arrayOf(3000.0, 4000.0, 5000.0), arrayOf(1000.0, 2000.0, 3000.0))
 * Output: 6000.0
 */
fun calculateTotalIncome(revenueArray: Array<Double>, expensesArray: Array<Double>): Double {

    var totalIncome = 0.0

    for (month in revenueArray.indices) {
        totalIncome += revenueArray[month] - expensesArray[month]
    }

    return totalIncome
}
/**
 * Given two arrays of revenue and expenses for each month,
 * calculate the total income for the specified period.
 *
 * @param revenueArray The array containing the revenue for each month.
 * @param expensesArray The array containing the expenses for each month.
 * @return The total income for the specified period.
 *
 * Example:
 * calculateTotalIncome(arrayOf(3000.0, 4000.0, 5000.0), arrayOf(1000.0, 2000.0, 3000.0))
 * Output: 6000.0
 */
fun calculateTotalIncome(revenueArray: Array<Double>, expensesArray: Array<Double>): Double {
/**
 * Given two arrays of revenue and expenses for each month,
 * calculate the total income for the specified period.
 *
 * @param revenueArray The array containing the revenue for each month.
 * @param expensesArray The array containing the expenses for each month.
 * @return The total income for the specified period.
 *
 * Example:
 * calculateTotalIncome(arrayOf(3000.0, 4000.0, 5000.0), arrayOf(1000.0, 2000.0, 3000.0))
 * Output: 6000.0
 */
fun calculateTotalIncome(revenueArray: Array<Double>, expensesArray: Array<Double>): Double {

    var totalIncome = 0.0

    for (month in revenueArray.indices) {
        totalIncome += revenueArray[month] - expensesArray[month]
    }

    return totalIncome
}