/**
 * This exercise aims to calculate the dot product of two vectors represented as arrays.
 * The dot product of two vectors is the sum of the products of their corresponding elements.
 * For example, the dot product of [1, 3, 5] and [2, 4, 6] is calculated as:
 * (1 * 2) + (3 * 4) + (5 * 6) = 2 + 12 + 30 = 44
 *
 * Complete the code below to calculate the dot product of two given arrays, v1 and v2, by iterating over them.
 */
fun dotProduct(v1: IntArray, v2: IntArray): Int {

    var result = 0
    for (i in v1.indices) {
        result += v1[i] * v2[i]
    }
    return result
}
/**
 * This exercise aims to calculate the dot product of two vectors represented as arrays.
 * The dot product of two vectors is the sum of the products of their corresponding elements.
 * For example, the dot product of [1, 3, 5] and [2, 4, 6] is calculated as:
 * (1 * 2) + (3 * 4) + (5 * 6) = 2 + 12 + 30 = 44
 *
 * Complete the code below to calculate the dot product of two given arrays, v1 and v2, by iterating over them.
 */
fun dotProduct(v1: IntArray, v2: IntArray): Int {
/**
 * This exercise aims to calculate the dot product of two vectors represented as arrays.
 * The dot product of two vectors is the sum of the products of their corresponding elements.
 * For example, the dot product of [1, 3, 5] and [2, 4, 6] is calculated as:
 * (1 * 2) + (3 * 4) + (5 * 6) = 2 + 12 + 30 = 44
 *
 * Complete the code below to calculate the dot product of two given arrays, v1 and v2, by iterating over them.
 */
fun dotProduct(v1: IntArray, v2: IntArray): Int {

    var result = 0
    for (i in v1.indices) {
        result += v1[i] * v2[i]
    }
    return result
}