/**
 * This function takes two scores as arguments and returns the sum of the scores.
 * If the sum is less than 90, it adds 10 to the score.
 * If the sum is between 90 and 100 (inclusive), it adds 20 to the score.
 * If the sum is greater than 100, it adds 30 to the score.
 *
 * @param score1 An integer representing the first score.
 * @param score2 An integer representing the second score.
 * @return The final score after the addition and conditional operations.
 */
fun calculateScore(score1: Int, score2: Int): Int {

    var totalScore = score1 + score2

    when {
        totalScore < 90 -> totalScore += 10
        totalScore in 90..100 -> totalScore += 20
        else -> totalScore += 30
    }

    return totalScore
}
/**
 * This function takes two scores as arguments and returns the sum of the scores.
 * If the sum is less than 90, it adds 10 to the score.
 * If the sum is between 90 and 100 (inclusive), it adds 20 to the score.
 * If the sum is greater than 100, it adds 30 to the score.
 *
 * @param score1 An integer representing the first score.
 * @param score2 An integer representing the second score.
 * @return The final score after the addition and conditional operations.
 */
fun calculateScore(score1: Int, score2: Int): Int {
/**
 * This function takes two scores as arguments and returns the sum of the scores.
 * If the sum is less than 90, it adds 10 to the score.
 * If the sum is between 90 and 100 (inclusive), it adds 20 to the score.
 * If the sum is greater than 100, it adds 30 to the score.
 *
 * @param score1 An integer representing the first score.
 * @param score2 An integer representing the second score.
 * @return The final score after the addition and conditional operations.
 */
fun calculateScore(score1: Int, score2: Int): Int {

    var totalScore = score1 + score2

    when {
        totalScore < 90 -> totalScore += 10
        totalScore in 90..100 -> totalScore += 20
        else -> totalScore += 30
    }

    return totalScore
}