Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int t04_count() {
- int cou = 1, pos = 0;
- string s;
- getline(cin, s);
- while((int)s.find(" ", pos) > -1){
- cou++;
- pos = s.find(" ", pos) + 1;
- }
- cout << cou;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement