To handle upper case letters
ch = tolower ( ch ) ; if ( ch == ' a ' ch == ' e ' ch == ' i ' ch == ' o ' ch == ' u ' ) vowels ++ ; else consonant ++ ; } else if ( ch >= '0' && ch <= '9' ) digit ++ ; else specialChar ++ ; } cout << " Vowels : ▁ " << vowels << endl ; cout << " Consonant : ▁ " << consonant << endl ; cout << " Digit : ▁ " << digit << endl ; cout << " Special ▁ Character : ▁ " << specialChar << endl ; }