Write a program to accept a string (in upper case)and count and print the consecutive vowels.
Example -
Sample input - EUROPE IS NOT A COUNTRY
Sample output - 2
(The consecutive vowels are 'EU' and 'OU')
Answers
Answered by
0
To do this, you need to compare the character present at the index n in the string is a vowel or not and also check whether the character at the index of n+1 is a vowel or not.
Hence if both are same then counter variable increases by 1.
Similar questions