You are given a string str of length n . Write a program to print the vowels in the given string str.
Input Format
For each test case, you will get a string str.
Constraints
1<=n<=10^4 String str contains only lower-case characters.
Output Format
Print the all vowels in a separate line.
Sample Input 0
apple
Sample Output 0
a
e
Explanation 0
Vowel in the string apple is a and e.
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String str=sc.next();
for(int i=0; i (less than) str.length(); i++){
if(str.charAt(i)=='a' || str.charAt(i)=='e' || str.charAt(i)=='i' || str.charAt(i)=='o' || str.charAt(i)=='u'){
System.out.println(str.charAt(i));
}
}
}
}