Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. char A='!';
  2. char B='?';
  3. char C=',';
  4. char D='.';
  5. statitc int countA=0;
  6. statitc int countB=0;
  7. statitc int countC=0;
  8. statitc int countD=0;
  9. void countMarks(string text)
  10. {
  11. for(int i=0;i<text.length;i++)
  12. switch (text[i])
  13. {
  14. case A :
  15. countA++;
  16. break;
  17. case B :
  18. countB++;
  19. break;
  20. case C :
  21. countC++;
  22. break;
  23. case D :
  24. countD++;
  25. break;
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement