/**
 * This function takes the number of times an athlete performed bench press in a given workout, and computes the
 * total number of repetitions that were correctly completed.
 *
 * @param times The number of times the athlete attempted to bench press.
 * @param benchPress A boolean value indicating whether the athlete successfully completed the bench press.
 * @return The number of bench press repetitions correctly completed.
 */
fun countRepetitions(times: Int, benchPress: Boolean): Int {

    var repetitions = 0
    var currentAttempt = 1

    while (currentAttempt <= times) {
        if (benchPress) {
            repetitions++
        } else {
            // Use a continue statement to skip the current iteration if the bench press was unsuccessful
            currentAttempt++
            continue
        }

        // Increment the current attempt by 1 after each iteration
        currentAttempt++
    }

    return repetitions
}
/**
 * This function takes the number of times an athlete performed bench press in a given workout, and computes the
 * total number of repetitions that were correctly completed.
 *
 * @param times The number of times the athlete attempted to bench press.
 * @param benchPress A boolean value indicating whether the athlete successfully completed the bench press.
 * @return The number of bench press repetitions correctly completed.
 */
fun countRepetitions(times: Int, benchPress: Boolean): Int {
/**
 * This function takes the number of times an athlete performed bench press in a given workout, and computes the
 * total number of repetitions that were correctly completed.
 *
 * @param times The number of times the athlete attempted to bench press.
 * @param benchPress A boolean value indicating whether the athlete successfully completed the bench press.
 * @return The number of bench press repetitions correctly completed.
 */
fun countRepetitions(times: Int, benchPress: Boolean): Int {

    var repetitions = 0
    var currentAttempt = 1

    while (currentAttempt <= times) {
        if (benchPress) {
            repetitions++
        } else {
            // Use a continue statement to skip the current iteration if the bench press was unsuccessful
            currentAttempt++
            continue
        }

        // Increment the current attempt by 1 after each iteration
        currentAttempt++
    }

    return repetitions
}