/**
 * Given a list of strings and a letter, concatenate all the strings that contain the letter using a for loop,
 * and return the final concatenated string.
 *
 * Example:
 * input: ["apple", "banana", "cherry", "kiwi"], "a"
 * output: "applebanana"
 *
 * input: ["laptop", "desk", "chair", "lamp"], "i"
 * output: "laptopchairlamp"
 */
fun concatenateStrings(words: List<String>, letter: Char): String {

    var result = ""
    for (word in words) {
        if (letter in word.toLowerCase()) {
            result += word
        }
    }
    return result
}
/**
 * Given a list of strings and a letter, concatenate all the strings that contain the letter using a for loop,
 * and return the final concatenated string.
 *
 * Example:
 * input: ["apple", "banana", "cherry", "kiwi"], "a"
 * output: "applebanana"
 *
 * input: ["laptop", "desk", "chair", "lamp"], "i"
 * output: "laptopchairlamp"
 */
fun concatenateStrings(words: List<String>, letter: Char): String {
/**
 * Given a list of strings and a letter, concatenate all the strings that contain the letter using a for loop,
 * and return the final concatenated string.
 *
 * Example:
 * input: ["apple", "banana", "cherry", "kiwi"], "a"
 * output: "applebanana"
 *
 * input: ["laptop", "desk", "chair", "lamp"], "i"
 * output: "laptopchairlamp"
 */
fun concatenateStrings(words: List<String>, letter: Char): String {

    var result = ""
    for (word in words) {
        if (letter in word.toLowerCase()) {
            result += word
        }
    }
    return result
}