/**
 * This exercise requires writing a function that takes a string and a character as input,
 * and returns the count of the character in the string using loops and Boolean expressions.
 */
fun countCharacter(string: String, char: Char): Int {

    // Initialize a count variable
    var count = 0

    // Iterate through each character in the string
    for (i in string.indices) {
        // Check if the current character matches the input character
        if (string[i] == char) {
            // Increment the count if there is a match
            count++
        }
    }

    // Return the final count
    return count
}
/**
 * This exercise requires writing a function that takes a string and a character as input,
 * and returns the count of the character in the string using loops and Boolean expressions.
 */
fun countCharacter(string: String, char: Char): Int {
/**
 * This exercise requires writing a function that takes a string and a character as input,
 * and returns the count of the character in the string using loops and Boolean expressions.
 */
fun countCharacter(string: String, char: Char): Int {

    // Initialize a count variable
    var count = 0

    // Iterate through each character in the string
    for (i in string.indices) {
        // Check if the current character matches the input character
        if (string[i] == char) {
            // Increment the count if there is a match
            count++
        }
    }

    // Return the final count
    return count
}