/**
 * Calculates the total displacement of a civil engineering structure given the distances and velocities.
 *
 * @param distances A list of distances (in meters) between consecutive points on the structure.
 * @param velocities A list of velocities (in m/s) at each point on the structure.
 * @return The total displacement (in meters) of the structure.
 *
 * Example:
 * computeTotalDisplacement(listOf(10, 5, 12), listOf(2, 3, 1))
 * Output: 60.0
 */
fun computeTotalDisplacement(distances: List<Int>, velocities: List<Int>): Double {

    var totalDisplacement = 0.0

    for (i in distances.indices) {
        totalDisplacement += distances[i] * velocities[i]
    }

    return totalDisplacement
}
/**
 * Calculates the total displacement of a civil engineering structure given the distances and velocities.
 *
 * @param distances A list of distances (in meters) between consecutive points on the structure.
 * @param velocities A list of velocities (in m/s) at each point on the structure.
 * @return The total displacement (in meters) of the structure.
 *
 * Example:
 * computeTotalDisplacement(listOf(10, 5, 12), listOf(2, 3, 1))
 * Output: 60.0
 */
fun computeTotalDisplacement(distances: List<Int>, velocities: List<Int>): Double {
/**
 * Calculates the total displacement of a civil engineering structure given the distances and velocities.
 *
 * @param distances A list of distances (in meters) between consecutive points on the structure.
 * @param velocities A list of velocities (in m/s) at each point on the structure.
 * @return The total displacement (in meters) of the structure.
 *
 * Example:
 * computeTotalDisplacement(listOf(10, 5, 12), listOf(2, 3, 1))
 * Output: 60.0
 */
fun computeTotalDisplacement(distances: List<Int>, velocities: List<Int>): Double {

    var totalDisplacement = 0.0

    for (i in distances.indices) {
        totalDisplacement += distances[i] * velocities[i]
    }

    return totalDisplacement
}