Problem: Problem Description

You are building a text analyzer tool. One of its features is detecting vowel clusters in a word.

Your task is to write a program that takes a word and counts how many vowel clusters it contains.

What is a Vowel Cluster?

A vowel cluster is a group of one or more vowels (a, e, i, o, u) that appear consecutively without any consonants in between.

Examples:

- "ae" is one vowel cluster.  
- "a" is one vowel cluster.  
- "abc" has one vowel cluster: "a".  

For example, in the word "beautiful", the vowels "eau" form one vowel cluster. Later, "i" and "u" form their own clusters. Hence, the word contains 3 vowel clusters in total.

--------------------------------------------------

Input Format

- An integer n, the length of the word.  
- A word of n lowercase English letters.

--------------------------------------------------

Output Format

- Print a single integer representing the number of vowel clusters in the word.

--------------------------------------------------

Assumptions on Input

1 <= n <= 100000  

--------------------------------------------------

Note

- Do not print any extra messages such as:
  cout << "Enter a number"
  cout << "The computed answer is"
- Use cout only to print the computed final output.
- Do not print unnecessary spaces.
- Do not hard-code the result.
- If any test case passes by simply printing output without logic, marks will not be awarded.

Student submission:
#include <simplecpp>
bool vowcheck(char a){
    //i just compare the input with all possible vowel values and or them together, to check if even one works
    return (a == 'a') or (a == 'e') or (a == 'i') or (a == 'o') or (a == 'u'); 
}
main_program{
    // a is the current read value
    char a;
    // n is the number of letters overall
    int n;
    // c is the current letter being checked
    int c = 0;
    // r is the number of vowelclusters yet
    int r = 0;
    // m is whether or not we are already in a vowel cluster
    bool m = (1 == 0);
    // this takes the first input that we were told is the length of the word
    cin >> n;
    // this is for looping over the whole text
    while (c < n) {
        // this is to take the letter
        cin >> a;
        // if we were not in a vowel cluster and we get a vowel
        if (vowcheck(a) and not m) {
            // it means we encountered a vowel cluster so increase that by 1
            r = r + 1;
            // and it means that we are now in a vowel cluster, (1==1) is because i forgot if true is case sensitive or smthing
            m = (1 == 1);
        }
        else {
            //if it is a wovel and and we are in a vowel cluster, than we do nothing
            // if it is not a vowel, we are not anymore in a vowelcluster
            if (not vowcheck(a)) {m = (1 == 0);}
        }
        // this is to go to the next letter
        c = c+1;
    }
    //to return the total number of vowel clusters found till the end of the word
    cout << r;
}

Grading criterion: Counter for Cluster Count
Rating A: Correctly increments the variable that maintains the counter for vowel clusters and prints it

Rating B: Some issue. 

Rating C: Major issue. 

Rating D: 0
Assigned grade: A