Answer:
Step-by-step explanation:
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int main()
{
char word;
int count = 0;
cout << "Please enter the word from which you want to check syllables: ";
cin.get(word);
cout << "Vowels: ";
while (word !=)<<endl;
{
cin.get(word);
switch (toupper(word))
{
case 'A': cout << word << ", ";
count++;
break;
case 'I': cout << word << ", ";
count++;
break;
case 'O': cout << word << ", ";
count++;
break;
case 'U': cout << word << ", ";
count++;
break;
case 'Y': cout << word << ", ";
count++;
break;
}
}
if (cin.get(word))
{
word == 'AI';
word == 'AU';
word == 'EA';
word == 'EE';
word == 'IE';
word == 'OA';
word == 'EO';
word == 'OI';
word == 'OO';
word == 'OU';
word == 'UI';
count--;
}
cout << "total number of " << count << " syllables in your word are:" << endl;
return 0;
}