/**
 * This exercise tests your understanding of control flow within nested loops and the 'Less Than' operator.
 * You are given the distance covered by an athlete and the time taken to cover that distance.
 * Your task is to find the number of times the athlete's position is less than the target position within the given time.
 */
fun intersectionOfControlFlow(athleteDistance: Int, timeTaken: Int): Int {

    var athletePosition = 0
    val targetPosition = 100
    var count = 0

    // Outer loop to iterate through the specified time interval
    repeat(timeTaken) {

        // Inner loop to make the athlete cover the distance
        repeat(athleteDistance) {
            athletePosition++

            // Check if athlete's position is less than target position
            if (athletePosition < targetPosition) {
                count++
            }
        }
    }

    return count
}
/**
 * This exercise tests your understanding of control flow within nested loops and the 'Less Than' operator.
 * You are given the distance covered by an athlete and the time taken to cover that distance.
 * Your task is to find the number of times the athlete's position is less than the target position within the given time.
 */
fun intersectionOfControlFlow(athleteDistance: Int, timeTaken: Int): Int {
/**
 * This exercise tests your understanding of control flow within nested loops and the 'Less Than' operator.
 * You are given the distance covered by an athlete and the time taken to cover that distance.
 * Your task is to find the number of times the athlete's position is less than the target position within the given time.
 */
fun intersectionOfControlFlow(athleteDistance: Int, timeTaken: Int): Int {

    var athletePosition = 0
    val targetPosition = 100
    var count = 0

    // Outer loop to iterate through the specified time interval
    repeat(timeTaken) {

        // Inner loop to make the athlete cover the distance
        repeat(athleteDistance) {
            athletePosition++

            // Check if athlete's position is less than target position
            if (athletePosition < targetPosition) {
                count++
            }
        }
    }

    return count
}