Advertisement
ShafiulAzim

uva 494

Feb 5th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. string str;
  6. int i,c,l;
  7. while(getline(cin,str))
  8. {
  9. c=0;
  10. l=str.size();
  11. for(i=0; i<l; i++)
  12. {
  13. if((((str[i]>='a' && str[i]<='z')||(str[i]>='A' && str[i]<='Z')))
  14. && ((str[i+1]<'a' || str[i+1]>'z') && (str[i+1]<'A' || str[i+1]>'Z')))
  15. {
  16. c++;
  17. }
  18. }
  19.  
  20. cout<<c<<endl;
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement