/**
 * Given a string and a character, the function finds the number of occurrences of the character in the string using loops.
 *
 * @param string The input string.
 * @param character The character to find.
 * @return The number of occurrences of the character in the string.
 */
fun findCharacter(string: String, character: Char): Int {

    var count = 0
    for (char in string) {
        if (char == character) {
            count++
        }
    }
    return count
}
/**
 * Given a string and a character, the function finds the number of occurrences of the character in the string using loops.
 *
 * @param string The input string.
 * @param character The character to find.
 * @return The number of occurrences of the character in the string.
 */
fun findCharacter(string: String, character: Char): Int {
/**
 * Given a string and a character, the function finds the number of occurrences of the character in the string using loops.
 *
 * @param string The input string.
 * @param character The character to find.
 * @return The number of occurrences of the character in the string.
 */
fun findCharacter(string: String, character: Char): Int {

    var count = 0
    for (char in string) {
        if (char == character) {
            count++
        }
    }
    return count
}