Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <string>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- string word;
- char test = ' ';
- int vowels = 0;
- int result[50] = { 0 };
- for (int i = 0; i < n; i++) {
- cin >> word;
- for (int j = 0; j < word.length(); j++) {
- char temp = word[j];
- if (temp == test) {
- vowels++;
- }
- }
- result[i] = vowels;
- }
- system("PAUSE");
- for (int i = 0; i < n; i++) {
- cout << result[i] << " " << endl;
- }
- cout << "Exiting..." << endl;
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement