Question: Write a program that inputs individual letters and creates a string of these letters except it will exclude the letter x. To signal the end
Write a program that inputs individual letters and creates a string of these letters except it will exclude the letter x. To signal the end of the input, the user will input the letter z. The final string should not include any x and should not include the z. The program must print the final string.
Sample input and output
Enter a character: o
Enter a character: x
Enter a character: k
Enter a character: a
Enter a character: x
Enter a character: y
Enter a character: z
The final string is okay
Cannot use break in the answer as we have not covered that in class yet.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
