Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include <iostream>
- using namespace std;
- int main()
- {
- string input;
- cout << "enter a string" << endl;
- cin >> input;
- int numbVowels=0;
- for(int i=0;i<input.length();i++){
- if((input[i]==("a"))|| (input[i]==("e"))|| (input[i]==("i")) || (input[i]==("o"))|| (input[i]==("u"))){
- numbVowels=numbVowels+1;
- }
- cout << numbVowels << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement