Question: this code is in C++ and it supposed to take in any word and print out how many syllabus the word has #include #include #include

this code is in C++ and it supposed to take in any word and print out how many syllabus the word has

#include #include #include using namespace std; int main() { string word; cout > word; int count = 0; int i = 0; char currentLetter = word[i]; bool prev_letter_vowel = false; /* condition that we are starting with the first letter in the string, that we are checking all letters before the last letter and that if a vowel is detected, the count is incremented by 1 */ for(int i=0;i

/ewly added code for the desired output cout

the output is coming out like this:

this code is in C++ and it supposed to take in any

And i want it to look like the second picture:

word and print out how many syllabus the word has #include #include

i'm trying to put all the output in the same colum, If you can show me how to do it the easy way using C++ please

Please enter a word : Hairy hairy hare the Word Syllabus Hairy 2 Please enter a word : Word Syllabus hairy 2 Please enter a word : Word Syllabus hare 1 Please enter a word : Word Syllabus the 1 Please enter a word : Word Syllabus Harry 2 hairy 2 hare 1 the 1

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!