daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Jan 11th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.*;
  2. public class Deac
  3. {
  4. public static void main(String[] args)
  5. {
  6.     Scanner scan=new Scanner(System.in); //cu asta se citeste input de la tastatura
  7.     String a=scan.nextLine();// cu asta citesc Ana are mere sau orice input
  8.     String[] b=a.split(" ");//cu asta selectez fiecare cuvant din input si l stochez intr un vector
  9.     //System.out.println(b[0]); //b[0] e ana si tot asa
  10.     int nr=0;//numar cuvintele care incep si se termina cu 2 vocale
  11.     for(int i=0;i<b.length;i++)
  12.     {
  13.         char[] aux=b[i].toCharArray();//mi am convertit fiecare cuvant intr un vector de char uri ca sa l accesez pe litere
  14.        
  15.             if(aux[0]==vocala & aux[aux.length-1]==vocala)
  16.             {
  17.                 nr++;
  18.             }
  19.        
  20.     }
  21.    
  22. }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top