/**
 * This function takes a list of farmer names and replaces all the vowels in each name with the letter 'x'.
 * The updated list of names is returned.
 *
 * @param farmersNames A list of strings representing the names of farmers.
 * @return A modified list of farmer names with vowels replaced by the letter 'x'.
 */
fun replaceVowelsWithX(farmersNames: List<String>): List<String> {

    val updatedNames = mutableListOf<String>()

    for (name in farmersNames) {
        var modifiedName = ""
        for (char in name) {
            if (char.toLowerCase() in listOf('a', 'e', 'i', 'o', 'u')) {
                modifiedName += 'x'
            } else {
                modifiedName += char
            }
        }
        updatedNames.add(modifiedName)
    }

    return updatedNames
}
/**
 * This function takes a list of farmer names and replaces all the vowels in each name with the letter 'x'.
 * The updated list of names is returned.
 *
 * @param farmersNames A list of strings representing the names of farmers.
 * @return A modified list of farmer names with vowels replaced by the letter 'x'.
 */
fun replaceVowelsWithX(farmersNames: List<String>): List<String> {
/**
 * This function takes a list of farmer names and replaces all the vowels in each name with the letter 'x'.
 * The updated list of names is returned.
 *
 * @param farmersNames A list of strings representing the names of farmers.
 * @return A modified list of farmer names with vowels replaced by the letter 'x'.
 */
fun replaceVowelsWithX(farmersNames: List<String>): List<String> {

    val updatedNames = mutableListOf<String>()

    for (name in farmersNames) {
        var modifiedName = ""
        for (char in name) {
            if (char.toLowerCase() in listOf('a', 'e', 'i', 'o', 'u')) {
                modifiedName += 'x'
            } else {
                modifiedName += char
            }
        }
        updatedNames.add(modifiedName)
    }

    return updatedNames
}