/**
 * Given a string, count the number of vowels (a, e, i, o, u) present in the string using a loop.
 *
 * Sample Input: 'Biomedical Engineer'
 * Sample Output: 9
 *
 * Sample Input: 'Python Programming'
 * Sample Output: 4
 */
fun countVowelsInString(string: String): Int {

    var count = 0

    // iterate over each character in the string
    for (char in string) {
        // check if the character is a vowel
        if (char.toLowerCase() in listOf('a', 'e', 'i', 'o', 'u')) {
            count++
        }
    }

    return count
}
/**
 * Given a string, count the number of vowels (a, e, i, o, u) present in the string using a loop.
 *
 * Sample Input: 'Biomedical Engineer'
 * Sample Output: 9
 *
 * Sample Input: 'Python Programming'
 * Sample Output: 4
 */
fun countVowelsInString(string: String): Int {
/**
 * Given a string, count the number of vowels (a, e, i, o, u) present in the string using a loop.
 *
 * Sample Input: 'Biomedical Engineer'
 * Sample Output: 9
 *
 * Sample Input: 'Python Programming'
 * Sample Output: 4
 */
fun countVowelsInString(string: String): Int {

    var count = 0

    // iterate over each character in the string
    for (char in string) {
        // check if the character is a vowel
        if (char.toLowerCase() in listOf('a', 'e', 'i', 'o', 'u')) {
            count++
        }
    }

    return count
}