Question: Write a C++ program that manipulates a string entered by the user. The program should start by asking the user to enter a word, a

Write a C++ program that manipulates a string entered by the user. The program should start by asking the user to enter a word, a sentence, or a string of numbers. Store whatever the user enters into a C++ string. The program should then display the following menu: USE THIS MENU TO MANIPULATE YOUR STRING ---------------------------------------

1) Inverse String 2) Reverse String 3) To Uppercase 4) Jumble String 5) Count Number Words 6) Count Consonants 7) Enter a Different String 8) Print the String 9) Quit

Option 1) Inverse the upper and lower case letters of the string. If the string contains numeric characters or special characters do not change them. Option 2) Reverse the order of the characters in the string. Option 3) Convert all of the characters in the string to uppercase Option 4) Call a function named jumbleString. The jumbleString function takes a string as input and displays a jumbled version of that string. The jumbleString function should be called using current version of the string an argument (input) to the function. Example: If the string passed to the jumbleString function is: hello A jumbled version of the word would be: elhlo Option 5) Call a function named countWords that counts the number of words in the current string and displays a message stating how many words are in the string "2016" is one word "I am bill" is 3 words Option 6) Call a function named countConsonants that counts the number of consonants in the current string and displays a message indicating how many consonants the string contains. (non vowels) Option 7) Let the user enter another string for processing. This should just change the string stored in the original string variable you created at the beginning of the program Option 8) Prints the String Option 9) Quits program

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!