/**
 * Calculate the dance score for a given dancer based on their age and experience.
 *
 * The dance score is determined in the following way:
 * - If the dancer's age is between 18 and 35 (inclusive) and their experience is less than 5 years,
 *   their score is the sum of their age and experience.
 * - If the dancer's age is between 18 and 35 (inclusive) and their experience is 5 years or more,
 *   their score is the product of their age and experience.
 * - If the dancer's age is either below 18 or above 35, their score is half of their experience.
 *
 * @param dancerAge The age of the dancer.
 * @param dancerExperience The number of years of dance experience.
 * @return The dance score of the dancer.
 */
fun calculateDanceScore(dancerAge: Int, dancerExperience: Int): Int {

    val danceScore: Int

    danceScore = if (dancerAge in 18..35) {
        if (dancerExperience < 5) {
            dancerAge + dancerExperience
        } else {
            dancerAge * dancerExperience
        }
    } else {
        dancerExperience / 2
    }

    return danceScore
}
/**
 * Calculate the dance score for a given dancer based on their age and experience.
 *
 * The dance score is determined in the following way:
 * - If the dancer's age is between 18 and 35 (inclusive) and their experience is less than 5 years,
 *   their score is the sum of their age and experience.
 * - If the dancer's age is between 18 and 35 (inclusive) and their experience is 5 years or more,
 *   their score is the product of their age and experience.
 * - If the dancer's age is either below 18 or above 35, their score is half of their experience.
 *
 * @param dancerAge The age of the dancer.
 * @param dancerExperience The number of years of dance experience.
 * @return The dance score of the dancer.
 */
fun calculateDanceScore(dancerAge: Int, dancerExperience: Int): Int {
/**
 * Calculate the dance score for a given dancer based on their age and experience.
 *
 * The dance score is determined in the following way:
 * - If the dancer's age is between 18 and 35 (inclusive) and their experience is less than 5 years,
 *   their score is the sum of their age and experience.
 * - If the dancer's age is between 18 and 35 (inclusive) and their experience is 5 years or more,
 *   their score is the product of their age and experience.
 * - If the dancer's age is either below 18 or above 35, their score is half of their experience.
 *
 * @param dancerAge The age of the dancer.
 * @param dancerExperience The number of years of dance experience.
 * @return The dance score of the dancer.
 */
fun calculateDanceScore(dancerAge: Int, dancerExperience: Int): Int {

    val danceScore: Int

    danceScore = if (dancerAge in 18..35) {
        if (dancerExperience < 5) {
            dancerAge + dancerExperience
        } else {
            dancerAge * dancerExperience
        }
    } else {
        dancerExperience / 2
    }

    return danceScore
}