Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- String[] nomi = new String[10];
- int size = nomi.length;
- for (int i = 0; i < size; i++) {
- System.out.println("Inserisci il nome " + (i + 1));
- nomi[i] = input.nextLine();
- }
- char[] vocali = {'a','o','e','i','u','A','O','E','I','U'};
- for (int i = 0; i < size; i++) {
- for(int j=0;j<10;j++){
- if (nomi[i].charAt(0) == vocali[j]) {
- System.out.println(nomi[i]);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement