/**
 * In this exercise, you are required to concatenate three strings based on nested logical operators.
 *
 * - The first string, string1, should be concatenated if both boolean1 and boolean2 are True.
 * - The second string, string2, should be concatenated if boolean1 is False and boolean2 is True.
 * - The third string, string3, should be concatenated if both boolean1 and boolean2 are False.
 *
 * Your task is to write Kotlin code that performs the concatenation based on the given conditions.
 */
fun concatenateStrings(string1: String, string2: String, string3: String, boolean1: Boolean, boolean2: Boolean): String {

    var result = ""

    // Concatenating first string if both boolean1 and boolean2 are True
    if (boolean1 && boolean2) {
        result += string1
    }

    // Concatenating second string if boolean1 is False and boolean2 is True
    else if (!boolean1 && boolean2) {
        result += string2
    }

    // Concatenating third string if both boolean1 and boolean2 are False
    else if (!boolean1 && !boolean2) {
        result += string3
    }

    return result
}
/**
 * In this exercise, you are required to concatenate three strings based on nested logical operators.
 *
 * - The first string, string1, should be concatenated if both boolean1 and boolean2 are True.
 * - The second string, string2, should be concatenated if boolean1 is False and boolean2 is True.
 * - The third string, string3, should be concatenated if both boolean1 and boolean2 are False.
 *
 * Your task is to write Kotlin code that performs the concatenation based on the given conditions.
 */
fun concatenateStrings(string1: String, string2: String, string3: String, boolean1: Boolean, boolean2: Boolean): String {
/**
 * In this exercise, you are required to concatenate three strings based on nested logical operators.
 *
 * - The first string, string1, should be concatenated if both boolean1 and boolean2 are True.
 * - The second string, string2, should be concatenated if boolean1 is False and boolean2 is True.
 * - The third string, string3, should be concatenated if both boolean1 and boolean2 are False.
 *
 * Your task is to write Kotlin code that performs the concatenation based on the given conditions.
 */
fun concatenateStrings(string1: String, string2: String, string3: String, boolean1: Boolean, boolean2: Boolean): String {

    var result = ""

    // Concatenating first string if both boolean1 and boolean2 are True
    if (boolean1 && boolean2) {
        result += string1
    }

    // Concatenating second string if boolean1 is False and boolean2 is True
    else if (!boolean1 && boolean2) {
        result += string2
    }

    // Concatenating third string if both boolean1 and boolean2 are False
    else if (!boolean1 && !boolean2) {
        result += string3
    }

    return result
}