#include
#include
main()
{
char n[80];
int j,l,count=0,x;
clrscr();
printf("Input a string ");
gets(n);
l=strlen(n);
for(j=0;j<1-1;j++)
{
switch(n[j])
{
case 'a':
case 'A':
case 'e':
case 'E':
case 'i':
case 'I':
case 'o':
case 'O':
case 'u':
case 'U':
x = checknext(n[j+1]);
if(x==1)
count++;
}
}
printf("\nIn entered string, two successive vowels occurs %d time(s)",count);
}
checknext(char x)
{
if(x=='a'||x=='A'||x=='e'||x=='E'||x=='i'||x=='I'||x=='o'||x=='O'||x=='u'||x=='U')
return(1);
else
return(0);
}
No comments:
Post a Comment