Mrgentledolphin

scrivi vocali

Feb 9th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. import java.util.*;
  2. public class voali {
  3.  
  4.     public static void main(String[] args) {
  5.         Scanner input = new Scanner (System.in);
  6.         String parole;
  7.         System.out.println("inserire parole");
  8.         parole=input.nextLine();
  9.         for(int i=0; i<parole.length(); i++){
  10.             if(parole.charAt(i)=='a' || parole.charAt(i)=='e' || parole.charAt(i)=='i' || parole.charAt(i)=='o' || parole.charAt(i)=='u'){
  11.                 System.out.print(parole.charAt(i)+" ");
  12.             }
  13.                
  14.         }
  15.  
  16.     }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment