You are on page 1of 1

#include<stdio.

h>
void main()
{
int i,j,k,count=0;
char a[20];
printf("Enter the string : ");
scanf("%s",a);
for(i=0;a[i]!='\0';i++)
{
for(j=i+1;a[j]!='\0';j++)
{
if(a[i]==a[j])
{
for(k=j;a[k]!='\0';k++)
{
a[k]=a[k+1];
}
j--;
}
}
}
a[i]='\0';
for(i=0;a[i]!='\0';i++)
{
if(a[i]=='a' || a[i]=='e' || a[i]=='i' || a[i]=='o' || a[i]=='u'
)
{
count++;
}
}
printf("Result string : %s \n Count of vowels : %d\n",a,count);
}

You might also like