Question
C program include Create a program in which a user can enter a string (up to 25 characters) and choose how they wish to manipulate
C program
include
Create a program in which a user can enter a string (up to 25 characters) and
choose how they wish to manipulate the string from a menu the program will
display. The program will continue to ask for commands until the user enters
the quit command. The commands are:
Replace All If a user types replace all using ANY sort of capitalization,
the program will prompt the user to enter the character to change and the new
character. Afterwards, it will replace all instances of the first character with
the new character and will printout the new string. This method does change
the original sentence entered.
Quit If the user types quit with any sort of capitalization, the program will stop running.
Example
Enter a string (up to 25 characters) to be transformed: Go Tigers
Enter your command (quit, replace all): REPLACE ALL Enter the character to replace: e Enter the new character: 3 Your new sentence is: Go Tig3rs
Enter your command (quit, replace all): replace some aaaaaaaaaaaaa12341234
Sorry, that command is invalid. Please type one of the options.
Enter your command (quit, replace all): replace all Enter the character to replace: i Enter the new character: 1 Your new sentence is: Go T1g3rs
Enter your command (quit, replace all): rePLace ALL Enter the character to replace: q Error, q is not in the string.
Enter your command (quit, replace all): QUIT
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started