Beruflich Dokumente
Kultur Dokumente
{
public static void main (String args[])
{
int i = 0;
int count = 0;
int counter = 0;
int nextvowel_counter = 0;
// String input = "aaaaeeaaiieeoiiouuuuaa";
String input = "aaeiioeaouu"; //input
int len = input.length();
String vowels = "aeiou "; //defining vowels to compare it with the
input string
if(vowels.charAt(0)==input.charAt(0))
{
count = 1;
}
else
{
count = 0;
}
int vowelincrement =0 ;
int flag =1;
for(i=0;i<=len-1;i++) //iterate the loop till the end of characters in the
input string A
if(vowels.charAt(vowelincrement)==input.charAt(i) )
{
flag=1;
counter++;
vowelincrement++;
counter++;
}
else if(flag == 1)
{
for(int vcount = 0; vcount<vowelincrement ; vcount++){
if(vowels.charAt(vcount)==input.charAt(i))
{
vowelincrement++;
flag =0;
break;
}
}