Question: C++ Question Instructions Write a C+ + program named reverse.cpp that Implements a recursive function that prints the input string backwards * o void reverse

C++ Question

C++ Question Instructions Write a C+ + program named reverse.cpp that Implements

Instructions Write a C+ + program named reverse.cpp that Implements a recursive function that prints the input string backwards * o void reverse (string input); Prompts the user for a string input that may consist of multiple words Prints the words in the same order as the input, but reversing each word by calling the reverse () unction Prompts the user for a character input, a choice whether to enter another string or to quit * * * o Accept 'Y" and 'y' for yes, 'N' and 'n' for no o Validate the input using a loop HINT: Because this program uses both getline () andcin >>, you must use cin.ignore ) to properly handle the user input. The order in which getline () and cin >> are used impacts how cin.ignore () should be used, so be mindful of where you place the cin.ignore () Sample Output Please enter a string with spaces: A quick brown fox jumps over the lazy dog A kciuq nworb xof spmuj revo eht yzal god Would you like to go again (Y/N)? a Invalid input, try again! Would you like to go again (Y/N)? x Invalid input, try again! Would you like to go again (Y/N)? P Invalid input, try again! Would you like to go again (Y/N)? R Invalid input, try again! Would you like to go again (Y/N)? y Please enter a string with spaces: Pack my bag with five dozen liquor jugs kcaP ym gab htiw evif nezod rouqil sguj Would you like to go again (Y/N)? o Invalid input, try again! Would you like to go again (Y/N)? u Invalid input, try again! Would you like to go again (Y/N) ? N

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!