Advertisement
teensee

Untitled

Mar 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. String abc = "аеиоуяюэы";
  2.        Scanner sc = new Scanner(System.in,"cp1251");
  3.        System.out.println("Введите строку");
  4.        String s = sc.nextLine();
  5.        char symbol = '=';
  6.        boolean check = false;
  7.        char[] c = s.toCharArray();
  8.        for(int i = 0; i < s.length(); i++){
  9.            for(int j = 0; j < abc.length(); j++){
  10.                if(c[i] == abc.charAt(j)){
  11.                   c[i] = symbol;
  12.                   check = true;
  13.                 }
  14.                if(check == true)
  15.                    break;
  16.            }
  17.        }
  18.        for(int i = 0; i < s.length(); i++)
  19.         System.out.printf("%c",c[i]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement