

Given string 'STR' : ‘Coding Ninjas’ there are 8 consonants i.e ‘C’,’d’,’n’,’g’,’N’,’n’,’j’,’s’, because these characters do not belong to set above mentioned set of vowels.
The first line of input contains an integer ‘T’ denoting the number of test cases.
The next ‘T’ lines represent the ‘T’ test cases.
The only line of each test case consists of a string ‘STR’
For each test case, print a single integer denoting the number of consonants in the string.
You don't need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 50
1 <= Length of 'STR' <= 10^4
The string consists of uppercase and lowercase characters and spaces.
Time Limit: 1 sec
If we can find if the current character is a consonant or not we can create a recursive to count all the vowels.
We can simply check if every element is a consonant or not and keep the count of the number of consonants using a simple for loop.
Here is the algorithm :