SHARE
TWEET

Untitled

a guest Jun 19th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int cons = 0;
  2.      for(int i=0; i<sentence.length(); i++) {
  3.         char currentLetter = sentence[i];
  4.         currentLetter = toupper(currentLetter);
  5.         switch(currentLetter) {
  6.         case 'A':
  7.         case 'E':
  8.         case 'I':
  9.         case 'O':
  10.         case 'U':
  11.         case ' ':
  12.         case '.':
  13.         case ',':
  14.         case '?':
  15.         case '!':
  16.         case '-':
  17.  
  18.  
  19.         default
  20.             cons++:
  21.    cout<<endl;
  22.    break;
  23.         }}
  24. return cons;
  25.  
  26. }
RAW Paste Data
Top