Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main(){
- string s ;
- cin >> s ;
- ifstream f (s );
- if ( f ){
- int n;
- f>> n ;
- f.ignore();
- for (int i=0;i<n;i++){
- int countNames = 0 ;
- string thisLine ; getline(f,thisLine);
- stringstream ss ( thisLine );
- string t ;
- while ( ss >> t ){
- if ( t.size()>=2 && isupper(t[0]) ){
- countNames ++;
- }
- }
- cout << countNames << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment