Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- Scanner in=new Scanner(System.in);
- String s;
- int ct=0;
- for(String str: s.split(" ")) {
- if(str.charAt(0)==97)
- {
- ct++;
- }
- }
- System.out.println("total number of words start with capital letters are :"+ct);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement