Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Solution {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- char[] arr = sc.next().toCharArray();
- int n = arr.length;
- int cnt=0;
- for(int i=0;i<n;i++){
- if(Character.isUpperCase(arr[i])){
- cnt++;
- }
- }
- cnt++;
- System.out.println(cnt);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment