Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.util.ArrayList;
- public class A4 {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- String string = sc.next();
- String output = "";
- string = string.toLowerCase();
- ArrayList<Character> strArray = new ArrayList<Character>();
- for(int x = 0; x <= string.length() - 1 ; x++){
- char temp = string.charAt(x);
- if(temp != 'a' && temp != 'o' && temp != 'y' && temp != 'e' && temp != 'u' && temp != 'i')
- strArray.add(temp);
- }
- for(int x = strArray.size() - 1; x >= 0 ; x--)
- strArray.add(x, '.');
- for(int x = 0; x <= strArray.size() - 1; x++){
- char temp = strArray.get(x);
- output += temp;
- }
- System.out.println(output);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement