#include <iostream>
#include <cstring>
int main()
{
#include <iostream>
using namespace std;
bool isVowel(char ch) {
return ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u';
}
void countLowercaseVowels(string word) {
int vowelCount = 0;
for (char ch : word) {
if (isVowel(ch)) {
vowelCount++;
}
}
cout << "Number of lowercase vowels in \"" << word << "\": " << vowelCount << endl;
}
int main() {
string input;
cout << "Enter a word: ";
cin >> input;
countLowercaseVowels(input);
return 0;
}
return 0;
}
No comments:
Post a Comment