Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. string input;
  6. cout << "enter a string" << endl;
  7. cin >> input;
  8. int numbVowels=0;
  9. for(int i=0;i<input.length();i++){
  10. if((input[i]==("a"))|| (input[i]==("e"))|| (input[i]==("i")) || (input[i]==("o"))|| (input[i]==("u"))){
  11. numbVowels=numbVowels+1;
  12. }
  13. cout << numbVowels << endl;
  14. }
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement