C++ code please to answer those question :

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

C++ code please to answer those question :

Post 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 51 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply