/**
 * A Physical Therapist wants to calculate the total number of repetitions performed by a patient during a workout session.
 * The function takes in the weight lifted, the number of sets performed, and the number of repetitions performed per set.
 * It then calculates and returns the total number of repetitions.
 */
fun calculateTotalReps(weight: Float, sets: Int, repsPerSet: Int): Int {

    // Calculate the total number of repetitions by multiplying the sets by the reps per set.
    var totalReps = sets * repsPerSet

    // Print the weight, sets, and reps per set in a clear format.
    println("The patient lifted $weight kg for $sets sets with $repsPerSet reps per set.")

    // Check if the weight is greater than 100 kg and the total number of repetitions is less than 50.
    if (weight > 100 && totalReps < 50) {
        // Subtract 5 from the total number of repetitions.
        totalReps -= 5
    }

    // Check if the weight is less than or equal to 100 kg and the total number of repetitions is between 50 and 100 (inclusive).
    else if (weight <= 100 && totalReps in 50..100) {
        // Perform some other operation if needed.
    }

    return totalReps
}
/**
 * A Physical Therapist wants to calculate the total number of repetitions performed by a patient during a workout session.
 * The function takes in the weight lifted, the number of sets performed, and the number of repetitions performed per set.
 * It then calculates and returns the total number of repetitions.
 */
fun calculateTotalReps(weight: Float, sets: Int, repsPerSet: Int): Int {
/**
 * A Physical Therapist wants to calculate the total number of repetitions performed by a patient during a workout session.
 * The function takes in the weight lifted, the number of sets performed, and the number of repetitions performed per set.
 * It then calculates and returns the total number of repetitions.
 */
fun calculateTotalReps(weight: Float, sets: Int, repsPerSet: Int): Int {

    // Calculate the total number of repetitions by multiplying the sets by the reps per set.
    var totalReps = sets * repsPerSet

    // Print the weight, sets, and reps per set in a clear format.
    println("The patient lifted $weight kg for $sets sets with $repsPerSet reps per set.")

    // Check if the weight is greater than 100 kg and the total number of repetitions is less than 50.
    if (weight > 100 && totalReps < 50) {
        // Subtract 5 from the total number of repetitions.
        totalReps -= 5
    }

    // Check if the weight is less than or equal to 100 kg and the total number of repetitions is between 50 and 100 (inclusive).
    else if (weight <= 100 && totalReps in 50..100) {
        // Perform some other operation if needed.
    }

    return totalReps
}