import java.io.*;
class VowelsInString
{
public static void main(String dd[])throws Exception
{
String str;
int count=0;
InputStreamReader isr=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
System.out.println("Enter Your String..");
str=br.readLine();
int len=str.length();
for(int i=0;i
{
if(str.charAt(i)=='a' || str.charAt(i)=='e' || str.charAt(i)=='i' || str.charAt(i)=='o' || str.charAt(i)=='u')
{
count++;
}
}
System.out.println("Number of Vowels is "+count);
}
}
No comments:
Post a Comment