i am doing my code in borland 5.02 i am trying to write a program that allows the user enter in two strings when prompted the program performs certain manipulation with the second string and then adds the result to the first string. the program should give me the user the choice of searching a string for a particular character, reversing the string ,changing the case of the string and reversing and changing the case of the string the output of the above string manipulation must be preceded by the first string. the program should be written using modular programing techniques such as functions using parameters where possible to reduce the use of global variables. the user should be allowed to repeat any of the string manipulations more than once in the same run of the program and be allowed to change the input strings to be manipulated during a run of the program. i have written out a code but it is completely wrong and i am trying to get better at c++ any help with this program.
i got this far the requirements are on the first post and i am stuck on were to go from here Code: #include <iostream.h> #include <string.h> int main(void) { string s; getline(cin, s); cout << s << endl; return 0; }
Good start. Double that and you've got the first part. After that you need to display a menu of choices: reverse string, change case and so on, get the user's choice, then a switch/case to perform the operation. The menu display and switch will need to be in a loop so that the actions can be repeated as requested, and one of the menu choices will need to be to exit the program.