/**
 * This function demonstrates the usage of nested if statements and iterating over each character of a string.
 * It prints the number of occurrences of the target character within the string.
 *
 * @param text The input string.
 * @param targetCharacter The character to find within the string.
 */
fun nestedIfStatementsExample(text: String, targetCharacter: Char) {

    // A nested if statement to validate if the targetCharacter is a single character
    if (targetCharacter.toString().length != 1) {
        println("Please provide a single character")
    }
}
/**
 * This function demonstrates the usage of nested if statements and iterating over each character of a string.
 * It prints the number of occurrences of the target character within the string.
 *
 * @param text The input string.
 * @param targetCharacter The character to find within the string.
 */
fun nestedIfStatementsExample(text: String, targetCharacter: Char) {
/**
 * This function demonstrates the usage of nested if statements and iterating over each character of a string.
 * It prints the number of occurrences of the target character within the string.
 *
 * @param text The input string.
 * @param targetCharacter The character to find within the string.
 */
fun nestedIfStatementsExample(text: String, targetCharacter: Char) {

    // A nested if statement to validate if the targetCharacter is a single character
    if (targetCharacter.toString().length != 1) {
        println("Please provide a single character")
    }
}