Advertisement
fahimkamal63

Count of camel case characters

May 7th, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3. #include<cctype>
  4. using namespace std;
  5. int main(){
  6.     int t; cin >> t;
  7.     while(t--){
  8.         string s; cin >> s;
  9.         int camal = 0;
  10.         for(int i = 0; i < s.size(); i++){
  11.             if(isupper(s[i])) camal++;
  12.         }
  13.         cout << camal << endl;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement