/**
 * This function takes a string and a character as input and returns
 * the number of times the character appears in the string using loops and modulus operator.
 *
 * @param string The input string.
 * @param character The character to find in the string.
 * @return The number of times the character appears in the string.
 *
 * Example:
 * findCharacters("abracadabra", "a") // 4
 * findCharacters("Hello, World!", "o") // 2
 */
fun findCharacters(string: String, character: Char): Int {

    var count = 0
    for (char in string) {
        if (char == character) {
            count++
        }
    }
    return count
}
/**
 * This function takes a string and a character as input and returns
 * the number of times the character appears in the string using loops and modulus operator.
 *
 * @param string The input string.
 * @param character The character to find in the string.
 * @return The number of times the character appears in the string.
 *
 * Example:
 * findCharacters("abracadabra", "a") // 4
 * findCharacters("Hello, World!", "o") // 2
 */
fun findCharacters(string: String, character: Char): Int {
/**
 * This function takes a string and a character as input and returns
 * the number of times the character appears in the string using loops and modulus operator.
 *
 * @param string The input string.
 * @param character The character to find in the string.
 * @return The number of times the character appears in the string.
 *
 * Example:
 * findCharacters("abracadabra", "a") // 4
 * findCharacters("Hello, World!", "o") // 2
 */
fun findCharacters(string: String, character: Char): Int {

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