Question: #include #include using namespace std; int read(string word) { int count = 0; bool vowels = false; for (int i = 0; i < word.length();

#include #include using namespace std; int read(string word) { int count = 0; bool vowels = false; for (int i = 0; i < word.length(); i++) { string ch = word.substr(i, 1); if (ch == "a" || ch == "e" || ch == "i" || ch == "o" || ch == "u" || ch == "y") { if (!vowels && !(ch == "e" && i == word.length() - 1)) { count++; vowels = true; } } else { vowels = false; } } if (count == 0) { count = 1; } cout << word << "\t " << count << endl; return 0; } int main() { string word; cout << "Please enter word: "; cin >> word; cout << "Word\tSyllabus" << endl; cout << "-----------------" << endl; if (word != "#") { read(word); } system("Pause"); return 0; }

I cant print many name at same time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!