wap to accept a string in upper case and find the frequency of each vowel present in the string
Answers
Answered by
6
class adiric
{
void main(String st)
{
int l=st.length();
int c=0;
for(i=0;i<l;i++)
{
char d=st.charAt(i);
if(d=='A'||d=='E'||d=='I'||d=='O'||d=='U')
C++
}
System.out.println(+c);
}
}
{
void main(String st)
{
int l=st.length();
int c=0;
for(i=0;i<l;i++)
{
char d=st.charAt(i);
if(d=='A'||d=='E'||d=='I'||d=='O'||d=='U')
C++
}
System.out.println(+c);
}
}
Similar questions