/**
 * This exercise aims to test your understanding of multiplication and the usage of enumerate in Kotlin.
 *
 * You are an astronomer trying to calculate the total mass of various planets in a solar system. Given a list of
 * planet masses in kilograms, your task is to calculate the product of the masses and return the result.
 *
 * Example:
 * If the input list is [5, 10, 3, 2], the expected output is 300 (5 * 10 * 3 * 2).
 *
 * Fill in the missing code below to solve the exercise.
 */
fun multiplicationEnumerateAstronomer(nums: List<Int>): Int {

    var totalMass = 1

    // Iterate through each planet mass and its corresponding index
    for ((index, mass) in nums.withIndex()) {
        // Multiply the current mass with the previous total mass
        totalMass *= mass
    }

    return totalMass
}
/**
 * This exercise aims to test your understanding of multiplication and the usage of enumerate in Kotlin.
 *
 * You are an astronomer trying to calculate the total mass of various planets in a solar system. Given a list of
 * planet masses in kilograms, your task is to calculate the product of the masses and return the result.
 *
 * Example:
 * If the input list is [5, 10, 3, 2], the expected output is 300 (5 * 10 * 3 * 2).
 *
 * Fill in the missing code below to solve the exercise.
 */
fun multiplicationEnumerateAstronomer(nums: List<Int>): Int {
/**
 * This exercise aims to test your understanding of multiplication and the usage of enumerate in Kotlin.
 *
 * You are an astronomer trying to calculate the total mass of various planets in a solar system. Given a list of
 * planet masses in kilograms, your task is to calculate the product of the masses and return the result.
 *
 * Example:
 * If the input list is [5, 10, 3, 2], the expected output is 300 (5 * 10 * 3 * 2).
 *
 * Fill in the missing code below to solve the exercise.
 */
fun multiplicationEnumerateAstronomer(nums: List<Int>): Int {

    var totalMass = 1

    // Iterate through each planet mass and its corresponding index
    for ((index, mass) in nums.withIndex()) {
        // Multiply the current mass with the previous total mass
        totalMass *= mass
    }

    return totalMass
}