Advertisement
kanciastopantalones

zad 14 wszystkie zaczynajace sie na a

Dec 6th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public static void main(String[] args) {
  2. Scanner in=new Scanner(System.in);
  3. String s;
  4. int ct=0;
  5. for(String str: s.split(" ")) {
  6. if(str.charAt(0)==97)
  7. {
  8. ct++;
  9.  
  10. }
  11. }
  12. System.out.println("total number of words start with capital letters are :"+ct);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement