Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

Why is marketability an important issue in business valuation?

Answered: 1 week ago