Question: This question has been asked before but it does not make sense to me and it does not compile either. Please help! Functions Create a

This question has been asked before but it does not make sense to me and it does not compile either. Please help!This question has been asked before but it does not make sense

Functions Create a program that: 1. 2. Declare a string and assign it an arbitrary starting value of your choosing Display the current contents of your string, then displays the following menu. If a function returns a string, it should replace the contents of your string, otherwise display the resulting information and leave the string unchanged. Function headers are provided; they should be used as-is in the manner appropriate a. string getlnput) . MUST use cin.getline 1. Due to differences in treatment of the In character when we hit enter, cin.ignore may have to be used to fix the input buffer ii. Reads user input from cin and stores it in the string being used. Contents will set initial state for the string next loop through program b. string printBetween(int a, int b, int step-1) Will return a string containing all numbers between a and b, including a and b, counting up i.E.G. a 6, b 3, output "3456" (don't use spaces) 1. If only two values are provided in the function call, assumes step of 1 ii.Order is unassumed, but data is displayed counting up C. String nonalnum-removed(string input) Returns the string provided as input with all characters that are neither digits nor alphabetio removed 1. Will probably involve function isalnum (slides/internet for references) 2. If a string, str, has its length changed, any saved results from str.length) calls will be STALE, meaning they no longer reflect our data d. string alphabet_numberified(string input) Returns the string provided as input, except with (only) alphabetic characters converted to their character codes within the string 1. "11a11" would become "119711 e int sumDigits(string digitString) Attempts to read each character as a digit, and returns the sum i.Inclusion of non-digit characters should result in a notification (via cout) of the character that could not be summed up f.void saveString(string savedStr) Prints the current string's contents to a file named .txt 1. You can overwrite the previous contents 3. Asks the user if they would like to return to step 2, or exit

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!