Advertisement
BassDrop

Denis Dimchev 24/01/2020 Es 38

Jan 24th, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package com.company;
  2. import java.util.Scanner;
  3.  
  4. public class Main {
  5.  
  6. public static void main(String[] args) {
  7. Scanner input = new Scanner(System.in);
  8. String[] nomi = new String[10];
  9. int size = nomi.length;
  10.  
  11. for (int i = 0; i < size; i++) {
  12. System.out.println("Inserisci il nome " + (i + 1));
  13. nomi[i] = input.nextLine();
  14. }
  15.  
  16. char[] vocali = {'a','o','e','i','u','A','O','E','I','U'};
  17. for (int i = 0; i < size; i++) {
  18. for(int j=0;j<10;j++){
  19. if (nomi[i].charAt(0) == vocali[j]) {
  20. System.out.println(nomi[i]);
  21. }
  22. }
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement