char words[10][20] = {"apple", "banana", "orange", "peach", "grape", "lemon", "pineapple", "watermelon", "strawberry", "kiwi"};
int countWordsWithTwoVowels(char words[][20], int numWords) { int count = 0; char vowels[] = {'a', 'e', 'i', 'o', 'u'}; int numVowels = sizeof(vowels) / sizeof(char); for (int i = 0; i < numWords; i++) { int len = strlen(words[i]); int consecutiveVowels = 0; for (int j = 0; j < len - 1; j++) { for (int k = 0; k < numVowels; k++) { if (words[i][j] == vowels[k] && words[i][j+1] == vowels[k]) { consecutiveVowels++; break; } } } if (consecutiveVowels >= 2) { count++; } } return count; }
int main() { int numWords = 10; int numWordsWithTwoVowels = countWordsWithTwoVowels(words, numWords); printf("