Page 1 of 1

C++ code please to answer those question :

Posted: Sun May 15, 2022 11:55 am
by answerhappygod
C++ code please to answer those question :
C Code Please To Answer Those Question 1
C Code Please To Answer Those Question 1 (279.38 KiB) Viewed 52 times
1. (20 points) the function size_t nonwscount( const string& s ) which counts the number of non white spaces. There are 3 non-white space characters: the space, the tab, and the new line. 2. (20 points) the function size_t vowelcount( const string& s ) which counts the number of vowels. There are 10 vowels: a,e,i,o,u,A,E,I,O,U. 3. (20 points) the function size_t semivowelcount( const string& s ) which counts the number semi vowels. There are 4 such semivowels: w,y,W,Y. 4. (20 points) the function size_t consonantcount( const string& s ) which counts the number of consonants. There are 52 – 14 = 38 such characters. 5. (20 points) the function int main() which does the following inside a while (true) loop cout « "Enter 0: to enter a sentence in English\n" << "Enter 1: to display the current sentence\n" << "Enter 2: to count non white space characters\n" << "Enter 3: to count and list vowels\n" << "Enter 4: to count and list semivowels: w,y\n" くく "Enter 5: to count and list consonants: \n" << "Enter 6: to list the words\n" << "Enter 7: to list individual words\n" << "Enter 8: to list the words in alphabetical order\n" << "Enter 9: quit the program\n" << "Your choice:"; Then based on the choice (which is stored into string) one of the above 10 tasks are executed.